Skip to content

Instantly share code, notes, and snippets.

@dankegel
Created September 26, 2013 03:02
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save dankegel/6709336 to your computer and use it in GitHub Desktop.
Save dankegel/6709336 to your computer and use it in GitHub Desktop.
Suppress warning from pragma not supported before gcc-4.6.
--- OpenNI2-2.0.0.30/Include/OpenNI.h.old 2013-09-25 09:13:08.000000000 -0700
+++ OpenNI2-2.0.0.30/Include/OpenNI.h 2013-09-25 09:14:42.000000000 -0700
@@ -83,12 +83,12 @@
} YUV422DoublePixel;
/** This special URI can be passed to @ref Device::open() when the application has no concern for a specific device. */
-#if ONI_PLATFORM != ONI_PLATFORM_WIN32
+#if (ONI_PLATFORM != ONI_PLATFORM_WIN32) && (((__GNUC__ * 100) + __GNUC_MINOR__) >= 406)
#pragma GCC diagnostic ignored "-Wunused-variable"
#pragma GCC diagnostic push
#endif
static const char* ANY_DEVICE = NULL;
-#if ONI_PLATFORM != ONI_PLATFORM_WIN32
+#if (ONI_PLATFORM != ONI_PLATFORM_WIN32) && (((__GNUC__ * 100) + __GNUC_MINOR__) >= 406)
#pragma GCC diagnostic pop
#endif
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment