office-gobmx/external/box2d/disable-shadow-warning-for-drawh.patch
Sarper Akdemir a46ab778d9 box2d: fix strict aliasing error and ignore -Wshadow
Adding two patches to static external library box2d
getting rid of strict aliasing error and ignoring
-Wshadow in b2Draw.h to get rid of errors while building.

Change-Id: I5752eb484d6aafe057c9102b1ed87aaf31d6555c
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/96559
Tested-by: Jenkins
Reviewed-by: Thorsten Behrens <Thorsten.Behrens@CIB.de>
2020-06-20 01:41:37 +02:00

18 lines
618 B
Diff

diff -ur box2d/Box2D/Box2D/Box2D.h box2d_patched/Box2D/Box2D/Box2D.h
--- box2d/Box2D/Box2D/Box2D.h 2014-04-06 03:43:12.000000000 +0300
+++ box2d_patched/Box2D/Box2D/Box2D.h 2020-06-17 18:44:25.920658966 +0300
@@ -32,7 +32,14 @@
// These include files constitute the main Box2D API
#include <Box2D/Common/b2Settings.h>
+#if defined __GNUC__
+#pragma GCC diagnostic push
+#pragma GCC diagnostic ignored "-Wshadow"
+#endif
#include <Box2D/Common/b2Draw.h>
+#if defined __GNUC__
+#pragma GCC diagnostic pop
+#endif
#include <Box2D/Common/b2Timer.h>
#include <Box2D/Collision/Shapes/b2CircleShape.h>