Fix an invalid offsetof warning-as-error (#6359)
The code already disables the warning on clang. It's also caused on GCC in some circumstances (particularly when building with -D_GLIBCXX_DEBUG).
This commit is contained in:
@@ -381,7 +381,14 @@ inline PointP2T& BlenderTessellatorP2T::GetActualPointStructure( p2t::Point& poi
|
||||
# pragma clang diagnostic push
|
||||
# pragma clang diagnostic ignored "-Winvalid-offsetof"
|
||||
#endif // __clang__
|
||||
#if defined __GNUC__
|
||||
# pragma GCC diagnostic push
|
||||
# pragma GCC diagnostic ignored "-Winvalid-offsetof"
|
||||
#endif // __GNUC__
|
||||
unsigned int pointOffset = offsetof( PointP2T, point2D );
|
||||
#if defined __GNUC__
|
||||
# pragma GCC diagnostic pop
|
||||
#endif // __GNUC__
|
||||
#if defined __clang__
|
||||
# pragma clang diagnostic pop
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user