changeset 2738:79c1bd651f04

Fixed a bunch of compile warnings on Mac OS X
author Sam Lantinga <slouken@libsdl.org>
date Mon, 01 Sep 2008 16:04:20 +0000
parents 140a7edcf2bd
children 68862734a5fd
files 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
diffstat 7 files changed, 8 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/src/audio/SDL_audiocvt.c	Sun Aug 31 16:04:32 2008 +0000
+++ b/src/audio/SDL_audiocvt.c	Mon Sep 01 16:04:20 2008 +0000
@@ -1622,7 +1622,6 @@
 SDL_BuildWindowedSinc(SDL_AudioCVT * cvt, SDL_AudioFormat format,
                       unsigned int m)
 {
-    float fScale;               /* scale factor for fixed point */
     float *fSinc;               /* floating point sinc buffer, to be converted to fixed point */
     float fc;                   /* cutoff frequency */
     float two_pi_fc, two_pi_over_m, four_pi_over_m, m_over_two;
@@ -1708,6 +1707,8 @@
     /* Clean up */
 #undef convert_fixed
     SDL_stack_free(fSinc);
+
+    return 0;
 }
 
 /* This is used to reduce the resampling ratio */
--- a/src/audio/macosx/SDL_coreaudio.c	Sun Aug 31 16:04:32 2008 +0000
+++ b/src/audio/macosx/SDL_coreaudio.c	Mon Sep 01 16:04:20 2008 +0000
@@ -418,7 +418,6 @@
     AURenderCallbackStruct callback;
     ComponentDescription desc;
     Component comp = NULL;
-    int use_system_device = 0;
     UInt32 enableIO = 0;
     const AudioUnitElement output_bus = 0;
     const AudioUnitElement input_bus = 1;
--- a/src/audio/macrom/SDL_romaudio.c	Sun Aug 31 16:04:32 2008 +0000
+++ b/src/audio/macrom/SDL_romaudio.c	Mon Sep 01 16:04:20 2008 +0000
@@ -89,6 +89,7 @@
     DecrementAtomic((SInt32 *) & need_to_mix);
 }
 
+#ifndef __MACOSX__
 static void
 SNDMGR_LockDevice(_THIS)
 {
@@ -114,6 +115,7 @@
         mix_buffer(this, buffer[fill_me]);
     }
 }
+#endif // __MACOSX__
 
 static void
 callBackProc(SndChannel * chan, SndCommand * cmd_passed)
--- a/src/video/cocoa/SDL_cocoaevents.m	Sun Aug 31 16:04:32 2008 +0000
+++ b/src/video/cocoa/SDL_cocoaevents.m	Mon Sep 01 16:04:20 2008 +0000
@@ -22,6 +22,7 @@
 #include "SDL_config.h"
 
 #include "SDL_cocoavideo.h"
+#include "../../events/SDL_events_c.h"
 
 /* setAppleMenu disappeared from the headers in 10.4 */
 #if MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_4
--- a/src/video/cocoa/SDL_cocoaopengl.m	Sun Aug 31 16:04:32 2008 +0000
+++ b/src/video/cocoa/SDL_cocoaopengl.m	Mon Sep 01 16:04:20 2008 +0000
@@ -27,6 +27,7 @@
 
 #if SDL_VIDEO_OPENGL_CGL
 #include <OpenGL/CGLTypes.h>
+#include <OpenGL/OpenGL.h>
 
 #include "SDL_loadso.h"
 #include "SDL_opengl.h"
--- a/src/video/x11/SDL_x11events.c	Sun Aug 31 16:04:32 2008 +0000
+++ b/src/video/x11/SDL_x11events.c	Mon Sep 01 16:04:20 2008 +0000
@@ -201,7 +201,7 @@
 #ifdef X_HAVE_UTF8_STRING
             if (data->ic) {
                 Xutf8LookupString(data->ic, &xevent.xkey, text, sizeof(text),
-                                  &keysym, status);
+                                  &keysym, &status);
             }
 #else
             XLookupString(&xevent.xkey, text, sizeof(text), &keysym, NULL);
--- a/src/video/x11/SDL_x11video.h	Sun Aug 31 16:04:32 2008 +0000
+++ b/src/video/x11/SDL_x11video.h	Mon Sep 01 16:04:20 2008 +0000
@@ -69,7 +69,7 @@
     int numwindows;
     SDL_WindowData **windowlist;
     int windowlistlength;
-    int *mouse;
+    int mouse;
     int keyboard;
     Atom WM_DELETE_WINDOW;
     SDL_scancode key_layout[256];