Moved the #include/#ifdef/#define stuff up to the top.
[freeglut] / src / freeglut_init.c
index ab6a1d2..d68341c 100644 (file)
@@ -68,7 +68,7 @@ SFG_State fgState = { { -1, -1, FALSE },  /* Position */
                       0,     /* FPSInterval */
                       0,     /* SwapCount */
                       0,     /* SwapTime */
-#ifdef TARGET_HOST_WIN32
+#if TARGET_HOST_WIN32
                       { 0, FALSE }, /* Time */
 #else
                       { { 0, 0 }, FALSE },
@@ -287,7 +287,7 @@ void fgDeinitialize( void )
     /*
      * Delete all the timers and their storage list
      */
-    while ( (timer = fgState.Timers.First) != NULL )
+    while ( (timer = (SFG_Timer *)fgState.Timers.First) != NULL )
     {
       fgListRemove ( &fgState.Timers, &timer->Node ) ;
       free ( timer ) ;
@@ -985,7 +985,7 @@ void FGAPIENTRY glutInitDisplayString( const char* displayMode )
    */
   char *token ;
   int len = strlen ( displayMode ) ;
-  char *buffer = malloc ( (len+1) * sizeof(char) ) ;
+  char *buffer = (char *)malloc ( (len+1) * sizeof(char) ) ;
   memcpy ( buffer, displayMode, len ) ;
   buffer[len] = '\0' ;