[libbluray-devel] Use GCC pragmas only with GCC

hpi1 git at videolan.org
Tue Jan 22 14:34:34 CET 2013


libbluray | branch: master | hpi1 <hpi1 at anonymous.org> | Tue Jan 22 15:22:31 2013 +0200| [d14863a982e8cb3f2961917b77582a7afa011a31] | committer: hpi1

Use GCC pragmas only with GCC

> http://git.videolan.org/gitweb.cgi/libbluray.git/?a=commit;h=d14863a982e8cb3f2961917b77582a7afa011a31
---

 src/libbluray/bdj/native/org_videolan_Libbluray.c |    2 ++
 src/libbluray/decoders/graphics_controller.c      |    2 ++
 2 files changed, 4 insertions(+)

diff --git a/src/libbluray/bdj/native/org_videolan_Libbluray.c b/src/libbluray/bdj/native/org_videolan_Libbluray.c
index 56d1a8d..318af94 100644
--- a/src/libbluray/bdj/native/org_videolan_Libbluray.c
+++ b/src/libbluray/bdj/native/org_videolan_Libbluray.c
@@ -398,7 +398,9 @@ JNIEXPORT void JNICALL Java_org_videolan_Libbluray_updateGraphicN(JNIEnv * env,
 }
 
 #define CC (char*)  /*cast a literal from (const char*)*/
+#if defined __GNUC__
 #pragma GCC diagnostic ignored "-Wcast-qual"
+#endif
 
 BD_PRIVATE const JNINativeMethod
 Java_org_videolan_Libbluray_methods[] =
diff --git a/src/libbluray/decoders/graphics_controller.c b/src/libbluray/decoders/graphics_controller.c
index 6bb0b92..1242872 100644
--- a/src/libbluray/decoders/graphics_controller.c
+++ b/src/libbluray/decoders/graphics_controller.c
@@ -365,7 +365,9 @@ static void _reset_page_state(GRAPHICS_CONTROLLER *gc)
  * overlay operations
  */
 
+#if defined __GNUC__
 #pragma GCC diagnostic ignored "-Wmissing-field-initializers"
+#endif
 
 static void _open_osd(GRAPHICS_CONTROLLER *gc, int plane,
                       unsigned x0, unsigned y0,



More information about the libbluray-devel mailing list