Use some GCC pragmas to ignore warnings in the GLee header and source file (so that we can compile cleanly, even with -Werror)

git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@4688 4a71c877-e1ca-e34f-864e-861f7616d084
master
Giel van Schijndel 2008-04-20 13:01:10 +00:00
parent 0859814e16
commit 055903cca2
3 changed files with 42 additions and 0 deletions

View File

@ -37,6 +37,11 @@
#pragma optimize( "g", off )
#endif
// WORKAROUND: Prevents warnings caused by -Wmissing-declarations.
#ifdef __GNUC__
#pragma GCC diagnostic ignored "-Wmissing-declarations"
#endif
#include <stdio.h>
#include <stdlib.h>
#include <string.h>

32
lib/ivis_opengl/GLee.diff Normal file
View File

@ -0,0 +1,32 @@
Index: GLee.c
===================================================================
--- GLee.c (revision 4687)
+++ GLee.c (working copy)
@@ -37,6 +37,11 @@
#pragma optimize( "g", off )
#endif
+// WORKAROUND: Prevents warnings caused by -Wmissing-declarations.
+#ifdef __GNUC__
+ #pragma GCC diagnostic ignored "-Wmissing-declarations"
+#endif
+
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
Index: GLee.h
===================================================================
--- GLee.h (revision 4687)
+++ GLee.h (working copy)
@@ -36,6 +36,11 @@
#ifndef __glee_h_
#define __glee_h_
+// WORKAROUND: Prevents warnings caused by -Wstrict-prototypes
+#ifdef __GNUC__
+ #pragma GCC diagnostic ignored "-Wstrict-prototypes"
+#endif
+
#ifdef __gl_h_
#error gl.h included before glee.h
#endif

View File

@ -36,6 +36,11 @@
#ifndef __glee_h_
#define __glee_h_
// WORKAROUND: Prevents warnings caused by -Wstrict-prototypes
#ifdef __GNUC__
#pragma GCC diagnostic ignored "-Wstrict-prototypes"
#endif
#ifdef __gl_h_
#error gl.h included before glee.h
#endif