Configuring with "--enable-warnings" broke three demos:

* CallbackMaker defined, but did not use, the Joystick() function
   (a callback for the freeglut joystick interface).  I uncommented
   the callback-registration.  I assume that it was commented out
   because it was spammy.  (freeglut does joysticks by polling with a
   timer.)  Perhaps a longer interval than 10ms would be advisable?

 * fractals.c used strcpy() without getting the prototype.  Added
   #include <string.h> at the top.

 * fractals_random.c had the same problem as fractals.c.


git-svn-id: https://svn.code.sf.net/p/freeglut/code/trunk@415 7f0cb862-5218-0410-a997-914c9d46530a
This commit is contained in:
rkrolib 2003-12-25 14:39:38 +00:00
parent 64443c7c4b
commit e72b2158c0
3 changed files with 3 additions and 1 deletions

View File

@ -149,7 +149,7 @@ main(int argc, char *argv[])
glutVisibilityFunc( Visibility ); glutVisibilityFunc( Visibility );
glutKeyboardUpFunc( KeyUp ); glutKeyboardUpFunc( KeyUp );
glutSpecialUpFunc( SpecialUp ); glutSpecialUpFunc( SpecialUp );
// glutJoystickFunc( Joystick, 10 ); glutJoystickFunc( Joystick, 10 );
glutMouseFunc ( Mouse ) ; glutMouseFunc ( Mouse ) ;
glutMouseWheelFunc ( MouseWheel ) ; glutMouseWheelFunc ( MouseWheel ) ;
glutMotionFunc ( Motion ) ; glutMotionFunc ( Motion ) ;

View File

@ -21,6 +21,7 @@
#include <GL/freeglut.h> #include <GL/freeglut.h>
#include <stdio.h> #include <stdio.h>
#include <stdlib.h> #include <stdlib.h>
#include <string.h>
#include <math.h> #include <math.h>
typedef struct typedef struct

View File

@ -23,6 +23,7 @@
#include <GL/freeglut.h> #include <GL/freeglut.h>
#include <stdio.h> #include <stdio.h>
#include <stdlib.h> #include <stdlib.h>
#include <string.h>
#include <math.h> #include <math.h>
#ifdef WIN32 #ifdef WIN32
#include <crtdbg.h> // DUMP MEMORY LEAKS #include <crtdbg.h> // DUMP MEMORY LEAKS