Fix a few more compiler warnings
authorSylvain Beucler <beuc@beuc.net>
Sat, 21 Apr 2012 19:04:02 +0000 (19:04 +0000)
committerSylvain Beucler <beuc@beuc.net>
Sat, 21 Apr 2012 19:04:02 +0000 (19:04 +0000)
git-svn-id: svn+ssh://svn.code.sf.net/p/freeglut/code/trunk/freeglut/freeglut@1259 7f0cb862-5218-0410-a997-914c9d46530a

CMakeLists.txt
src/egl/fg_state_egl.c
src/fg_init.h [new file with mode: 0644]
src/x11/fg_state_x11.c
src/x11/fg_state_x11_glx.c
src/x11/fg_state_x11_glx.h [new file with mode: 0644]
src/x11/fg_window_x11_glx.c

index 39febb2..8b3c49b 100644 (file)
@@ -145,6 +145,7 @@ ELSE()
             src/x11/fg_internal_x11_glx.h
             src/x11/fg_display_x11_glx.c
             src/x11/fg_state_x11_glx.c
+            src/x11/fg_state_x11_glx.h
             src/x11/fg_window_x11_glx.c
             src/x11/fg_window_x11_glx.h
         )
index 2890d00..59fc9c9 100644 (file)
@@ -33,7 +33,7 @@
 static int fgPlatformGetConfig( int attribute )
 {
   int returnValue = 0;
-  int result;  /*  Not checked  */
+  int result __fg_unused;  /*  Not checked  */
 
   if( fgStructure.CurrentWindow )
       result = eglGetConfigAttrib( fgDisplay.pDisplay.egl.Display,
diff --git a/src/fg_init.h b/src/fg_init.h
new file mode 100644 (file)
index 0000000..a9fdb17
--- /dev/null
@@ -0,0 +1,34 @@
+/*
+ * fg_init.h
+ *
+ * Various freeglut initialization functions.
+ *
+ * Copyright (c) 1999-2000 Pawel W. Olszta. All Rights Reserved.
+ * Written by Pawel W. Olszta, <olszta@sourceforge.net>
+ * Creation date: Thu Dec 2 1999
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included
+ * in all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
+ * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
+ * PAWEL W. OLSZTA BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
+ * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ */
+
+#ifndef __FG_INIT_H__
+#define __FG_INIT_H__
+
+extern void fghCloseInputDevices(void);
+extern void fgDeinitialize(void);
+
+#endif
index cb55109..3aa19b1 100644 (file)
@@ -29,6 +29,8 @@
 #include "fg_internal.h"
 #ifdef EGL_VERSION_1_0
 #include "egl/fg_state_egl.h"
+#else
+#include "x11/fg_state_x11_glx.h"
 #endif
 
 int fgPlatformGlutDeviceGet ( GLenum eWhat )
index bd2b35e..4688196 100644 (file)
@@ -27,6 +27,7 @@
 
 #include <GL/freeglut.h>
 #include "fg_internal.h"
+#include "x11/fg_window_x11_glx.h"
 
 /*
  * Queries the GL context about some attributes
@@ -34,7 +35,7 @@
 int fgPlatformGetConfig( int attribute )
 {
   int returnValue = 0;
-  int result;  /*  Not checked  */
+  int result __fg_unused;  /*  Not checked  */
 
   if( fgStructure.CurrentWindow )
       result = glXGetFBConfigAttrib( fgDisplay.pDisplay.Display,
@@ -170,7 +171,7 @@ int *fgPlatformGlutGetModeValues(GLenum eWhat, int *size)
       if (fbconfigArray != NULL)
         {
           int * temp_array;
-          int result;   /*  Returned by glXGetFBConfigAttrib. Not checked.  */
+          int result __fg_unused;   /*  Returned by glXGetFBConfigAttrib. Not checked.  */
           int previous_value;
           int i;
 
diff --git a/src/x11/fg_state_x11_glx.h b/src/x11/fg_state_x11_glx.h
new file mode 100644 (file)
index 0000000..c6349a2
--- /dev/null
@@ -0,0 +1,35 @@
+/*
+ * fg_state_x11_glx.c
+ *
+ * X11-specific freeglut state query methods.
+ *
+ * Copyright (c) 1999-2000 Pawel W. Olszta. All Rights Reserved.
+ * Written by Pawel W. Olszta, <olszta@sourceforge.net>
+ * Copied for Platform code by Evan Felix <karcaw at gmail.com>
+ * Creation date: Thur Feb 2 2012
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included
+ * in all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
+ * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
+ * PAWEL W. OLSZTA BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
+ * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ */
+
+#ifndef __FG_STATE_X11_GLX_H__
+#define __FG_STATE_X11_GLX_H__
+
+int fgPlatformGetConfig(int attribute);
+int fghPlatformGlutGetGLX(GLenum eWhat);
+
+#endif
index 2efe7e8..bbabb75 100644 (file)
@@ -115,7 +115,7 @@ int fghChooseConfig(GLXFBConfig* fbconfig)
 
         if (fbconfigArray != NULL)
         {
-            int result;  /* Returned by glXGetFBConfigAttrib, not checked. */
+            int result __fg_unused;  /* Returned by glXGetFBConfigAttrib, not checked. */
 
 
             if( wantIndexedMode )