Explicitly cast function pointer to (void *) in SET_WCB since all callbacks stored...
[freeglut] / src / freeglut_internal.h
index cea8ad8..a97e029 100644 (file)
@@ -392,12 +392,12 @@ struct tagSFG_WindowState
  * and for no other reason.  Since it's hidden in the macro, the
  * ugliness is felt to be rather benign.
  */
-#define SET_WCB(window,cbname,func)                   \
-do                                                    \
-{                                                     \
-    if( FETCH_WCB( window, cbname ) != func )         \
-        (((window).CallBacks[CB_ ## cbname]) = func); \
-} while( 0 )                                          \
+#define SET_WCB(window,cbname,func)                            \
+do                                                             \
+{                                                              \
+    if( FETCH_WCB( window, cbname ) != func )                  \
+        (((window).CallBacks[CB_ ## cbname]) = (void *) func); \
+} while( 0 )                                                   \
 
 /*
  * FETCH_WCB() is used as: