Fixed some minor compiler warnings.
1.1 --- a/src/file/SDL_rwops.c Fri Jul 20 13:32:34 2012 -0400
1.2 +++ b/src/file/SDL_rwops.c Fri Jul 20 13:33:15 2012 -0400
1.3 @@ -438,9 +438,6 @@
1.4 SDL_RWFromFile(const char *file, const char *mode)
1.5 {
1.6 SDL_RWops *rwops = NULL;
1.7 -#ifdef HAVE_STDIO_H
1.8 - FILE *fp = NULL;
1.9 -#endif
1.10 if (!file || !*file || !mode || !*mode) {
1.11 SDL_SetError("SDL_RWFromFile(): No file or no mode specified");
1.12 return NULL;
1.13 @@ -472,15 +469,17 @@
1.14 rwops->close = windows_file_close;
1.15
1.16 #elif HAVE_STDIO_H
1.17 - #ifdef __APPLE__
1.18 - fp = SDL_OpenFPFromBundleOrFallback(file, mode);
1.19 - #else
1.20 - fp = fopen(file, mode);
1.21 - #endif
1.22 - if (fp == NULL) {
1.23 - SDL_SetError("Couldn't open %s", file);
1.24 - } else {
1.25 - rwops = SDL_RWFromFP(fp, 1);
1.26 + {
1.27 + #ifdef __APPLE__
1.28 + FILE *fp = SDL_OpenFPFromBundleOrFallback(file, mode);
1.29 + #else
1.30 + FILE *fp = fopen(file, mode);
1.31 + #endif
1.32 + if (fp == NULL) {
1.33 + SDL_SetError("Couldn't open %s", file);
1.34 + } else {
1.35 + rwops = SDL_RWFromFP(fp, 1);
1.36 + }
1.37 }
1.38 #else
1.39 SDL_SetError("SDL not compiled with stdio support");
2.1 --- a/src/render/software/SDL_rotate.h Fri Jul 20 13:32:34 2012 -0400
2.2 +++ b/src/render/software/SDL_rotate.h Fri Jul 20 13:33:15 2012 -0400
2.3 @@ -3,4 +3,5 @@
2.4 #endif
2.5
2.6 extern SDL_Surface *_rotateSurface(SDL_Surface * src, double angle, int centerx, int centery, int smooth, int flipx, int flipy, int dstwidth, int dstheight, double cangle, double sangle);
2.7 -extern void _rotozoomSurfaceSizeTrig(int width, int height, double angle, int *dstwidth, int *dstheight, double *cangle, double *sangle);
2.8 \ No newline at end of file
2.9 +extern void _rotozoomSurfaceSizeTrig(int width, int height, double angle, int *dstwidth, int *dstheight, double *cangle, double *sangle);
2.10 +
3.1 --- a/src/video/x11/SDL_x11opengl.c Fri Jul 20 13:32:34 2012 -0400
3.2 +++ b/src/video/x11/SDL_x11opengl.c Fri Jul 20 13:33:15 2012 -0400
3.3 @@ -95,8 +95,10 @@
3.4
3.5 #ifndef GLX_EXT_create_context_es2_profile
3.6 #define GLX_EXT_create_context_es2_profile
3.7 +#ifndef GLX_CONTEXT_ES2_PROFILE_BIT_EXT
3.8 #define GLX_CONTEXT_ES2_PROFILE_BIT_EXT 0x00000002
3.9 #endif
3.10 +#endif
3.11
3.12 #ifndef GLX_EXT_swap_control
3.13 #define GLX_SWAP_INTERVAL_EXT 0x20F1
4.1 --- a/src/video/x11/SDL_x11xinput2.c Fri Jul 20 13:32:34 2012 -0400
4.2 +++ b/src/video/x11/SDL_x11xinput2.c Fri Jul 20 13:33:15 2012 -0400
4.3 @@ -29,16 +29,19 @@
4.4
4.5 #define MAX_AXIS 16
4.6
4.7 +#if SDL_VIDEO_DRIVER_X11_XINPUT2
4.8 static int xinput2_initialized = 0;
4.9 +
4.10 +#if SDL_VIDEO_DRIVER_X11_XINPUT2_SUPPORTS_MULTITOUCH
4.11 static int xinput2_multitouch_supported = 0;
4.12 -/* Opcode returned XQueryExtension
4.13 +#endif
4.14 +
4.15 +/* Opcode returned XQueryExtension
4.16 * It will be used in event processing
4.17 * to know that the event came from
4.18 * this extension */
4.19 static int xinput2_opcode;
4.20
4.21 -
4.22 -#if SDL_VIDEO_DRIVER_X11_XINPUT2
4.23 static void parse_valuators(const double *input_values,unsigned char *mask,int mask_len,
4.24 double *output_values,int output_values_len) {
4.25 int i = 0,z = 0;
4.26 @@ -237,12 +240,20 @@
4.27
4.28 int
4.29 X11_Xinput2IsInitialized() {
4.30 +#if SDL_VIDEO_DRIVER_X11_XINPUT2
4.31 return xinput2_initialized;
4.32 +#else
4.33 + return 0;
4.34 +#endif
4.35 }
4.36
4.37 int
4.38 X11_Xinput2IsMutitouchSupported() {
4.39 +#if SDL_VIDEO_DRIVER_X11_XINPUT2_SUPPORTS_MULTITOUCH
4.40 return xinput2_initialized && xinput2_multitouch_supported;
4.41 +#else
4.42 + return 0;
4.43 +#endif
4.44 }
4.45
4.46 #endif /* SDL_VIDEO_DRIVER_X11 */