Fixed a bunch of compile warnings on Mac OS X
authorSam Lantinga <slouken@libsdl.org>
Mon, 01 Sep 2008 16:04:20 +0000
changeset 273879c1bd651f04
parent 2737 140a7edcf2bd
child 2739 68862734a5fd
Fixed a bunch of compile warnings on Mac OS X
src/audio/SDL_audiocvt.c
src/audio/macosx/SDL_coreaudio.c
src/audio/macrom/SDL_romaudio.c
src/video/cocoa/SDL_cocoaevents.m
src/video/cocoa/SDL_cocoaopengl.m
src/video/x11/SDL_x11events.c
src/video/x11/SDL_x11video.h
     1.1 --- a/src/audio/SDL_audiocvt.c	Sun Aug 31 16:04:32 2008 +0000
     1.2 +++ b/src/audio/SDL_audiocvt.c	Mon Sep 01 16:04:20 2008 +0000
     1.3 @@ -1622,7 +1622,6 @@
     1.4  SDL_BuildWindowedSinc(SDL_AudioCVT * cvt, SDL_AudioFormat format,
     1.5                        unsigned int m)
     1.6  {
     1.7 -    float fScale;               /* scale factor for fixed point */
     1.8      float *fSinc;               /* floating point sinc buffer, to be converted to fixed point */
     1.9      float fc;                   /* cutoff frequency */
    1.10      float two_pi_fc, two_pi_over_m, four_pi_over_m, m_over_two;
    1.11 @@ -1708,6 +1707,8 @@
    1.12      /* Clean up */
    1.13  #undef convert_fixed
    1.14      SDL_stack_free(fSinc);
    1.15 +
    1.16 +    return 0;
    1.17  }
    1.18  
    1.19  /* This is used to reduce the resampling ratio */
     2.1 --- a/src/audio/macosx/SDL_coreaudio.c	Sun Aug 31 16:04:32 2008 +0000
     2.2 +++ b/src/audio/macosx/SDL_coreaudio.c	Mon Sep 01 16:04:20 2008 +0000
     2.3 @@ -418,7 +418,6 @@
     2.4      AURenderCallbackStruct callback;
     2.5      ComponentDescription desc;
     2.6      Component comp = NULL;
     2.7 -    int use_system_device = 0;
     2.8      UInt32 enableIO = 0;
     2.9      const AudioUnitElement output_bus = 0;
    2.10      const AudioUnitElement input_bus = 1;
     3.1 --- a/src/audio/macrom/SDL_romaudio.c	Sun Aug 31 16:04:32 2008 +0000
     3.2 +++ b/src/audio/macrom/SDL_romaudio.c	Mon Sep 01 16:04:20 2008 +0000
     3.3 @@ -89,6 +89,7 @@
     3.4      DecrementAtomic((SInt32 *) & need_to_mix);
     3.5  }
     3.6  
     3.7 +#ifndef __MACOSX__
     3.8  static void
     3.9  SNDMGR_LockDevice(_THIS)
    3.10  {
    3.11 @@ -114,6 +115,7 @@
    3.12          mix_buffer(this, buffer[fill_me]);
    3.13      }
    3.14  }
    3.15 +#endif // __MACOSX__
    3.16  
    3.17  static void
    3.18  callBackProc(SndChannel * chan, SndCommand * cmd_passed)
     4.1 --- a/src/video/cocoa/SDL_cocoaevents.m	Sun Aug 31 16:04:32 2008 +0000
     4.2 +++ b/src/video/cocoa/SDL_cocoaevents.m	Mon Sep 01 16:04:20 2008 +0000
     4.3 @@ -22,6 +22,7 @@
     4.4  #include "SDL_config.h"
     4.5  
     4.6  #include "SDL_cocoavideo.h"
     4.7 +#include "../../events/SDL_events_c.h"
     4.8  
     4.9  /* setAppleMenu disappeared from the headers in 10.4 */
    4.10  #if MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_4
     5.1 --- a/src/video/cocoa/SDL_cocoaopengl.m	Sun Aug 31 16:04:32 2008 +0000
     5.2 +++ b/src/video/cocoa/SDL_cocoaopengl.m	Mon Sep 01 16:04:20 2008 +0000
     5.3 @@ -27,6 +27,7 @@
     5.4  
     5.5  #if SDL_VIDEO_OPENGL_CGL
     5.6  #include <OpenGL/CGLTypes.h>
     5.7 +#include <OpenGL/OpenGL.h>
     5.8  
     5.9  #include "SDL_loadso.h"
    5.10  #include "SDL_opengl.h"
     6.1 --- a/src/video/x11/SDL_x11events.c	Sun Aug 31 16:04:32 2008 +0000
     6.2 +++ b/src/video/x11/SDL_x11events.c	Mon Sep 01 16:04:20 2008 +0000
     6.3 @@ -201,7 +201,7 @@
     6.4  #ifdef X_HAVE_UTF8_STRING
     6.5              if (data->ic) {
     6.6                  Xutf8LookupString(data->ic, &xevent.xkey, text, sizeof(text),
     6.7 -                                  &keysym, status);
     6.8 +                                  &keysym, &status);
     6.9              }
    6.10  #else
    6.11              XLookupString(&xevent.xkey, text, sizeof(text), &keysym, NULL);
     7.1 --- a/src/video/x11/SDL_x11video.h	Sun Aug 31 16:04:32 2008 +0000
     7.2 +++ b/src/video/x11/SDL_x11video.h	Mon Sep 01 16:04:20 2008 +0000
     7.3 @@ -69,7 +69,7 @@
     7.4      int numwindows;
     7.5      SDL_WindowData **windowlist;
     7.6      int windowlistlength;
     7.7 -    int *mouse;
     7.8 +    int mouse;
     7.9      int keyboard;
    7.10      Atom WM_DELETE_WINDOW;
    7.11      SDL_scancode key_layout[256];