Patch from Sylvain to fix clang warnings
authorSam Lantinga <slouken@libsdl.org>
Sun, 13 Nov 2016 22:57:41 -0800
changeset 10609d702ecbd8ba7
parent 10608 8661c956c368
child 10610 3f25b3dd334e
Patch from Sylvain to fix clang warnings
include/SDL_test_assert.h
include/SDL_test_fuzzer.h
include/SDL_test_images.h
src/SDL.c
src/audio/SDL_audio.c
src/audio/SDL_sysaudio.h
src/core/linux/SDL_ime.h
src/core/linux/SDL_udev.c
src/events/SDL_gesture.c
src/events/SDL_mouse.c
src/events/SDL_touch.c
src/haptic/SDL_haptic.c
src/haptic/SDL_syshaptic.h
src/joystick/SDL_gamecontroller.c
src/joystick/SDL_sysjoystick.h
src/joystick/linux/SDL_sysjoystick.c
src/power/SDL_power.c
src/power/SDL_syspower.h
src/power/linux/SDL_syspower.c
src/render/opengl/SDL_shaders_gl.h
src/render/opengles/SDL_render_gles.c
src/render/opengles2/SDL_render_gles2.c
src/render/software/SDL_blendfillrect.c
src/render/software/SDL_blendline.c
src/render/software/SDL_blendpoint.c
src/render/software/SDL_rotate.c
src/stdlib/SDL_string.c
src/test/SDL_test_crc32.c
src/test/SDL_test_fuzzer.c
src/test/SDL_test_harness.c
src/test/SDL_test_imageBlit.c
src/test/SDL_test_imageBlitBlend.c
src/test/SDL_test_imageFace.c
src/test/SDL_test_imagePrimitives.c
src/test/SDL_test_imagePrimitivesBlend.c
src/test/SDL_test_log.c
src/thread/SDL_systhread.h
src/thread/SDL_thread_c.h
src/thread/pthread/SDL_syscond.c
src/thread/pthread/SDL_systls.c
src/timer/unix/SDL_systimer.c
src/video/SDL_RLEaccel.c
src/video/SDL_blit_1.c
src/video/SDL_bmp.c
src/video/SDL_video.c
src/video/x11/SDL_x11events.c
src/video/x11/SDL_x11messagebox.c
src/video/x11/SDL_x11modes.c
src/video/x11/SDL_x11opengl.c
src/video/x11/SDL_x11window.c
     1.1 --- a/include/SDL_test_assert.h	Sun Nov 13 00:09:02 2016 -0800
     1.2 +++ b/include/SDL_test_assert.h	Sun Nov 13 22:57:41 2016 -0800
     1.3 @@ -80,12 +80,12 @@
     1.4  /**
     1.5   * \brief Resets the assert summary counters to zero.
     1.6   */
     1.7 -void SDLTest_ResetAssertSummary();
     1.8 +void SDLTest_ResetAssertSummary(void);
     1.9  
    1.10  /**
    1.11   * \brief Logs summary of all assertions (total, pass, fail) since last reset as INFO or ERROR.
    1.12   */
    1.13 -void SDLTest_LogAssertSummary();
    1.14 +void SDLTest_LogAssertSummary(void);
    1.15  
    1.16  
    1.17  /**
    1.18 @@ -93,7 +93,7 @@
    1.19   *
    1.20   * \returns TEST_RESULT_PASSED, TEST_RESULT_FAILED, or TEST_RESULT_NO_ASSERT
    1.21   */
    1.22 -int SDLTest_AssertSummaryToTestResult();
    1.23 +int SDLTest_AssertSummaryToTestResult(void);
    1.24  
    1.25  #ifdef __cplusplus
    1.26  }
     2.1 --- a/include/SDL_test_fuzzer.h	Sun Nov 13 00:09:02 2016 -0800
     2.2 +++ b/include/SDL_test_fuzzer.h	Sun Nov 13 22:57:41 2016 -0800
     2.3 @@ -68,14 +68,14 @@
     2.4   *
     2.5   * \returns Generated integer
     2.6   */
     2.7 -Uint8 SDLTest_RandomUint8();
     2.8 +Uint8 SDLTest_RandomUint8(void);
     2.9  
    2.10  /**
    2.11   * Returns a random Sint8
    2.12   *
    2.13   * \returns Generated signed integer
    2.14   */
    2.15 -Sint8 SDLTest_RandomSint8();
    2.16 +Sint8 SDLTest_RandomSint8(void);
    2.17  
    2.18  
    2.19  /**
    2.20 @@ -83,14 +83,14 @@
    2.21   *
    2.22   * \returns Generated integer
    2.23   */
    2.24 -Uint16 SDLTest_RandomUint16();
    2.25 +Uint16 SDLTest_RandomUint16(void);
    2.26  
    2.27  /**
    2.28   * Returns a random Sint16
    2.29   *
    2.30   * \returns Generated signed integer
    2.31   */
    2.32 -Sint16 SDLTest_RandomSint16();
    2.33 +Sint16 SDLTest_RandomSint16(void);
    2.34  
    2.35  
    2.36  /**
    2.37 @@ -98,7 +98,7 @@
    2.38   *
    2.39   * \returns Generated integer
    2.40   */
    2.41 -Sint32 SDLTest_RandomSint32();
    2.42 +Sint32 SDLTest_RandomSint32(void);
    2.43  
    2.44  
    2.45  /**
    2.46 @@ -106,14 +106,14 @@
    2.47   *
    2.48   * \returns Generated integer
    2.49   */
    2.50 -Uint32 SDLTest_RandomUint32();
    2.51 +Uint32 SDLTest_RandomUint32(void);
    2.52  
    2.53  /**
    2.54   * Returns random Uint64.
    2.55   *
    2.56   * \returns Generated integer
    2.57   */
    2.58 -Uint64 SDLTest_RandomUint64();
    2.59 +Uint64 SDLTest_RandomUint64(void);
    2.60  
    2.61  
    2.62  /**
    2.63 @@ -121,29 +121,29 @@
    2.64   *
    2.65   * \returns Generated signed integer
    2.66   */
    2.67 -Sint64 SDLTest_RandomSint64();
    2.68 +Sint64 SDLTest_RandomSint64(void);
    2.69  
    2.70  /**
    2.71   * \returns random float in range [0.0 - 1.0[
    2.72   */
    2.73 -float SDLTest_RandomUnitFloat();
    2.74 +float SDLTest_RandomUnitFloat(void);
    2.75  
    2.76  /**
    2.77   * \returns random double in range [0.0 - 1.0[
    2.78   */
    2.79 -double SDLTest_RandomUnitDouble();
    2.80 +double SDLTest_RandomUnitDouble(void);
    2.81  
    2.82  /**
    2.83   * \returns random float.
    2.84   *
    2.85   */
    2.86 -float SDLTest_RandomFloat();
    2.87 +float SDLTest_RandomFloat(void);
    2.88  
    2.89  /**
    2.90   * \returns random double.
    2.91   *
    2.92   */
    2.93 -double SDLTest_RandomDouble();
    2.94 +double SDLTest_RandomDouble(void);
    2.95  
    2.96  /**
    2.97   * Returns a random boundary value for Uint8 within the given boundaries.
    2.98 @@ -338,7 +338,7 @@
    2.99   *
   2.100   * \returns Newly allocated random string; or NULL if length was invalid or string could not be allocated.
   2.101   */
   2.102 -char * SDLTest_RandomAsciiString();
   2.103 +char * SDLTest_RandomAsciiString(void);
   2.104  
   2.105  
   2.106  /**
   2.107 @@ -371,7 +371,7 @@
   2.108  /**
   2.109   * Returns the invocation count for the fuzzer since last ...FuzzerInit.
   2.110   */
   2.111 -int SDLTest_GetFuzzerInvocationCount();
   2.112 +int SDLTest_GetFuzzerInvocationCount(void);
   2.113  
   2.114  /* Ends C function definitions when using C++ */
   2.115  #ifdef __cplusplus
     3.1 --- a/include/SDL_test_images.h	Sun Nov 13 00:09:02 2016 -0800
     3.2 +++ b/include/SDL_test_images.h	Sun Nov 13 22:57:41 2016 -0800
     3.3 @@ -55,17 +55,17 @@
     3.4  } SDLTest_SurfaceImage_t;
     3.5  
     3.6  /* Test images */
     3.7 -SDL_Surface *SDLTest_ImageBlit();
     3.8 -SDL_Surface *SDLTest_ImageBlitColor();
     3.9 -SDL_Surface *SDLTest_ImageBlitAlpha();
    3.10 -SDL_Surface *SDLTest_ImageBlitBlendAdd();
    3.11 -SDL_Surface *SDLTest_ImageBlitBlend();
    3.12 -SDL_Surface *SDLTest_ImageBlitBlendMod();
    3.13 -SDL_Surface *SDLTest_ImageBlitBlendNone();
    3.14 -SDL_Surface *SDLTest_ImageBlitBlendAll();
    3.15 -SDL_Surface *SDLTest_ImageFace();
    3.16 -SDL_Surface *SDLTest_ImagePrimitives();
    3.17 -SDL_Surface *SDLTest_ImagePrimitivesBlend();
    3.18 +SDL_Surface *SDLTest_ImageBlit(void);
    3.19 +SDL_Surface *SDLTest_ImageBlitColor(void);
    3.20 +SDL_Surface *SDLTest_ImageBlitAlpha(void);
    3.21 +SDL_Surface *SDLTest_ImageBlitBlendAdd(void);
    3.22 +SDL_Surface *SDLTest_ImageBlitBlend(void);
    3.23 +SDL_Surface *SDLTest_ImageBlitBlendMod(void);
    3.24 +SDL_Surface *SDLTest_ImageBlitBlendNone(void);
    3.25 +SDL_Surface *SDLTest_ImageBlitBlendAll(void);
    3.26 +SDL_Surface *SDLTest_ImageFace(void);
    3.27 +SDL_Surface *SDLTest_ImagePrimitives(void);
    3.28 +SDL_Surface *SDLTest_ImagePrimitivesBlend(void);
    3.29  
    3.30  /* Ends C function definitions when using C++ */
    3.31  #ifdef __cplusplus
     4.1 --- a/src/SDL.c	Sun Nov 13 00:09:02 2016 -0800
     4.2 +++ b/src/SDL.c	Sun Nov 13 22:57:41 2016 -0800
     4.3 @@ -36,10 +36,7 @@
     4.4  
     4.5  /* Initialization/Cleanup routines */
     4.6  #if !SDL_TIMERS_DISABLED
     4.7 -extern int SDL_TimerInit(void);
     4.8 -extern void SDL_TimerQuit(void);
     4.9 -extern void SDL_TicksInit(void);
    4.10 -extern void SDL_TicksQuit(void);
    4.11 +# include "timer/SDL_timer_c.h"
    4.12  #endif
    4.13  #if SDL_VIDEO_DRIVER_WINDOWS
    4.14  extern int SDL_HelperWindowCreate(void);
     5.1 --- a/src/audio/SDL_audio.c	Sun Nov 13 00:09:02 2016 -0800
     5.2 +++ b/src/audio/SDL_audio.c	Sun Nov 13 22:57:41 2016 -0800
     5.3 @@ -33,36 +33,6 @@
     5.4  static SDL_AudioDriver current_audio;
     5.5  static SDL_AudioDevice *open_devices[16];
     5.6  
     5.7 -/*
     5.8 - * Not all of these will be compiled and linked in, but it's convenient
     5.9 - *  to have a complete list here and saves yet-another block of #ifdefs...
    5.10 - *  Please see bootstrap[], below, for the actual #ifdef mess.
    5.11 - */
    5.12 -extern AudioBootStrap PULSEAUDIO_bootstrap;
    5.13 -extern AudioBootStrap ALSA_bootstrap;
    5.14 -extern AudioBootStrap SNDIO_bootstrap;
    5.15 -extern AudioBootStrap BSD_AUDIO_bootstrap;
    5.16 -extern AudioBootStrap DSP_bootstrap;
    5.17 -extern AudioBootStrap QSAAUDIO_bootstrap;
    5.18 -extern AudioBootStrap SUNAUDIO_bootstrap;
    5.19 -extern AudioBootStrap ARTS_bootstrap;
    5.20 -extern AudioBootStrap ESD_bootstrap;
    5.21 -extern AudioBootStrap NACLAUDIO_bootstrap;
    5.22 -extern AudioBootStrap NAS_bootstrap;
    5.23 -extern AudioBootStrap XAUDIO2_bootstrap;
    5.24 -extern AudioBootStrap DSOUND_bootstrap;
    5.25 -extern AudioBootStrap WINMM_bootstrap;
    5.26 -extern AudioBootStrap PAUDIO_bootstrap;
    5.27 -extern AudioBootStrap HAIKUAUDIO_bootstrap;
    5.28 -extern AudioBootStrap COREAUDIO_bootstrap;
    5.29 -extern AudioBootStrap DISKAUDIO_bootstrap;
    5.30 -extern AudioBootStrap DUMMYAUDIO_bootstrap;
    5.31 -extern AudioBootStrap FUSIONSOUND_bootstrap;
    5.32 -extern AudioBootStrap ANDROIDAUDIO_bootstrap;
    5.33 -extern AudioBootStrap PSPAUDIO_bootstrap;
    5.34 -extern AudioBootStrap SNDIO_bootstrap;
    5.35 -extern AudioBootStrap EMSCRIPTENAUDIO_bootstrap;
    5.36 -
    5.37  /* Available audio drivers */
    5.38  static const AudioBootStrap *const bootstrap[] = {
    5.39  #if SDL_AUDIO_DRIVER_PULSEAUDIO
     6.1 --- a/src/audio/SDL_sysaudio.h	Sun Nov 13 00:09:02 2016 -0800
     6.2 +++ b/src/audio/SDL_sysaudio.h	Sun Nov 13 22:57:41 2016 -0800
     6.3 @@ -200,6 +200,78 @@
     6.4      int demand_only;  /* 1==request explicitly, or it won't be available. */
     6.5  } AudioBootStrap;
     6.6  
     6.7 +#if SDL_AUDIO_DRIVER_PULSEAUDIO
     6.8 +extern AudioBootStrap PULSEAUDIO_bootstrap;
     6.9 +#endif
    6.10 +#if SDL_AUDIO_DRIVER_ALSA
    6.11 +extern AudioBootStrap ALSA_bootstrap;
    6.12 +#endif
    6.13 +#if SDL_AUDIO_DRIVER_SNDIO
    6.14 +extern AudioBootStrap SNDIO_bootstrap;
    6.15 +#endif
    6.16 +#if SDL_AUDIO_DRIVER_BSD
    6.17 +extern AudioBootStrap BSD_AUDIO_bootstrap;
    6.18 +#endif
    6.19 +#if SDL_AUDIO_DRIVER_OSS
    6.20 +extern AudioBootStrap DSP_bootstrap;
    6.21 +#endif
    6.22 +#if SDL_AUDIO_DRIVER_QSA
    6.23 +extern AudioBootStrap QSAAUDIO_bootstrap;
    6.24 +#endif
    6.25 +#if SDL_AUDIO_DRIVER_SUNAUDIO
    6.26 +extern AudioBootStrap SUNAUDIO_bootstrap;
    6.27 +#endif
    6.28 +#if SDL_AUDIO_DRIVER_ARTS
    6.29 +extern AudioBootStrap ARTS_bootstrap;
    6.30 +#endif
    6.31 +#if SDL_AUDIO_DRIVER_ESD
    6.32 +extern AudioBootStrap ESD_bootstrap;
    6.33 +#endif
    6.34 +#if SDL_AUDIO_DRIVER_NACL
    6.35 +extern AudioBootStrap NACLAUDIO_bootstrap;
    6.36 +#endif
    6.37 +#if SDL_AUDIO_DRIVER_NAS
    6.38 +extern AudioBootStrap NAS_bootstrap;
    6.39 +#endif
    6.40 +#if SDL_AUDIO_DRIVER_XAUDIO2
    6.41 +extern AudioBootStrap XAUDIO2_bootstrap;
    6.42 +#endif
    6.43 +#if SDL_AUDIO_DRIVER_DSOUND
    6.44 +extern AudioBootStrap DSOUND_bootstrap;
    6.45 +#endif
    6.46 +#if SDL_AUDIO_DRIVER_WINMM
    6.47 +extern AudioBootStrap WINMM_bootstrap;
    6.48 +#endif
    6.49 +#if SDL_AUDIO_DRIVER_PAUDIO
    6.50 +extern AudioBootStrap PAUDIO_bootstrap;
    6.51 +#endif
    6.52 +#if SDL_AUDIO_DRIVER_HAIKU
    6.53 +extern AudioBootStrap HAIKUAUDIO_bootstrap;
    6.54 +#endif
    6.55 +#if SDL_AUDIO_DRIVER_COREAUDIO
    6.56 +extern AudioBootStrap COREAUDIO_bootstrap;
    6.57 +#endif
    6.58 +#if SDL_AUDIO_DRIVER_DISK
    6.59 +extern AudioBootStrap DISKAUDIO_bootstrap;
    6.60 +#endif
    6.61 +#if SDL_AUDIO_DRIVER_DUMMY
    6.62 +extern AudioBootStrap DUMMYAUDIO_bootstrap;
    6.63 +#endif
    6.64 +#if SDL_AUDIO_DRIVER_FUSIONSOUND
    6.65 +extern AudioBootStrap FUSIONSOUND_bootstrap;
    6.66 +#endif
    6.67 +#if SDL_AUDIO_DRIVER_ANDROID
    6.68 +extern AudioBootStrap ANDROIDAUDIO_bootstrap;
    6.69 +#endif
    6.70 +#if SDL_AUDIO_DRIVER_PSP
    6.71 +extern AudioBootStrap PSPAUDIO_bootstrap;
    6.72 +#endif
    6.73 +#if SDL_AUDIO_DRIVER_EMSCRIPTEN
    6.74 +extern AudioBootStrap EMSCRIPTENAUDIO_bootstrap;
    6.75 +#endif
    6.76 +
    6.77 +
    6.78 +
    6.79  #endif /* _SDL_sysaudio_h */
    6.80  
    6.81  /* vi: set ts=4 sw=4 expandtab: */
     7.1 --- a/src/core/linux/SDL_ime.h	Sun Nov 13 00:09:02 2016 -0800
     7.2 +++ b/src/core/linux/SDL_ime.h	Sun Nov 13 22:57:41 2016 -0800
     7.3 @@ -27,12 +27,12 @@
     7.4  #include "SDL_stdinc.h"
     7.5  #include "SDL_rect.h"
     7.6  
     7.7 -extern SDL_bool SDL_IME_Init();
     7.8 -extern void SDL_IME_Quit();
     7.9 +extern SDL_bool SDL_IME_Init(void);
    7.10 +extern void SDL_IME_Quit(void);
    7.11  extern void SDL_IME_SetFocus(SDL_bool focused);
    7.12 -extern void SDL_IME_Reset();
    7.13 +extern void SDL_IME_Reset(void);
    7.14  extern SDL_bool SDL_IME_ProcessKeyEvent(Uint32 keysym, Uint32 keycode);
    7.15  extern void SDL_IME_UpdateTextRect(SDL_Rect *rect);
    7.16 -extern void SDL_IME_PumpEvents();
    7.17 +extern void SDL_IME_PumpEvents(void);
    7.18  
    7.19  #endif /* _SDL_ime_h */
     8.1 --- a/src/core/linux/SDL_udev.c	Sun Nov 13 00:09:02 2016 -0800
     8.2 +++ b/src/core/linux/SDL_udev.c	Sun Nov 13 22:57:41 2016 -0800
     8.3 @@ -280,7 +280,7 @@
     8.4  #define BITS_PER_LONG           (sizeof(unsigned long) * 8)
     8.5  #define NBITS(x)                ((((x)-1)/BITS_PER_LONG)+1)
     8.6  #define OFF(x)                  ((x)%BITS_PER_LONG)
     8.7 -#define BIT(x)                  (1UL<<OFF(x))
     8.8 +/* #define BIT(x)                  (1UL<<OFF(x)) */
     8.9  #define LONG(x)                 ((x)/BITS_PER_LONG)
    8.10  #define test_bit(bit, array)    ((array[LONG(bit)] >> OFF(bit)) & 1)
    8.11  
     9.1 --- a/src/events/SDL_gesture.c	Sun Nov 13 00:09:02 2016 -0800
     9.2 +++ b/src/events/SDL_gesture.c	Sun Nov 13 22:57:41 2016 -0800
     9.3 @@ -71,9 +71,9 @@
     9.4      SDL_bool recording;
     9.5  } SDL_GestureTouch;
     9.6  
     9.7 -SDL_GestureTouch *SDL_gestureTouch;
     9.8 -int SDL_numGestureTouches = 0;
     9.9 -SDL_bool recordAll;
    9.10 +static SDL_GestureTouch *SDL_gestureTouch;
    9.11 +static int SDL_numGestureTouches = 0;
    9.12 +static SDL_bool recordAll;
    9.13  
    9.14  #if 0
    9.15  static void PrintPath(SDL_FloatPoint *path)
    9.16 @@ -468,7 +468,7 @@
    9.17      return NULL;
    9.18  }
    9.19  
    9.20 -int SDL_SendGestureMulti(SDL_GestureTouch* touch,float dTheta,float dDist)
    9.21 +static int SDL_SendGestureMulti(SDL_GestureTouch* touch,float dTheta,float dDist)
    9.22  {
    9.23      SDL_Event event;
    9.24      event.mgesture.type = SDL_MULTIGESTURE;
    10.1 --- a/src/events/SDL_mouse.c	Sun Nov 13 00:09:02 2016 -0800
    10.2 +++ b/src/events/SDL_mouse.c	Sun Nov 13 22:57:41 2016 -0800
    10.3 @@ -82,6 +82,7 @@
    10.4      return mouse->focus;
    10.5  }
    10.6  
    10.7 +#if 0
    10.8  void
    10.9  SDL_ResetMouse(void)
   10.10  {
   10.11 @@ -98,6 +99,7 @@
   10.12      }
   10.13      SDL_assert(mouse->buttonstate == 0);
   10.14  }
   10.15 +#endif
   10.16  
   10.17  void
   10.18  SDL_SetMouseFocus(SDL_Window * window)
    11.1 --- a/src/events/SDL_touch.c	Sun Nov 13 00:09:02 2016 -0800
    11.2 +++ b/src/events/SDL_touch.c	Sun Nov 13 22:57:41 2016 -0800
    11.3 @@ -92,7 +92,7 @@
    11.4      return -1;
    11.5  }
    11.6  
    11.7 -SDL_Finger *
    11.8 +static SDL_Finger *
    11.9  SDL_GetFinger(const SDL_Touch * touch, SDL_FingerID id)
   11.10  {
   11.11      int index = SDL_GetFingerIndex(touch, id);
    12.1 --- a/src/haptic/SDL_haptic.c	Sun Nov 13 00:09:02 2016 -0800
    12.2 +++ b/src/haptic/SDL_haptic.c	Sun Nov 13 22:57:41 2016 -0800
    12.3 @@ -25,7 +25,7 @@
    12.4  #include "../joystick/SDL_joystick_c.h" /* For SDL_PrivateJoystickValid */
    12.5  #include "SDL_assert.h"
    12.6  
    12.7 -SDL_Haptic *SDL_haptics = NULL;
    12.8 +static SDL_Haptic *SDL_haptics = NULL;
    12.9  
   12.10  
   12.11  /*
    13.1 --- a/src/haptic/SDL_syshaptic.h	Sun Nov 13 00:09:02 2016 -0800
    13.2 +++ b/src/haptic/SDL_syshaptic.h	Sun Nov 13 22:57:41 2016 -0800
    13.3 @@ -62,7 +62,7 @@
    13.4  extern int SDL_SYS_HapticInit(void);
    13.5  
    13.6  /* Function to return the number of haptic devices plugged in right now */
    13.7 -extern int SDL_SYS_NumHaptics();
    13.8 +extern int SDL_SYS_NumHaptics(void);
    13.9  
   13.10  /*
   13.11   * Gets the device dependent name of the haptic device
    14.1 --- a/src/joystick/SDL_gamecontroller.c	Sun Nov 13 00:09:02 2016 -0800
    14.2 +++ b/src/joystick/SDL_gamecontroller.c	Sun Nov 13 22:57:41 2016 -0800
    14.3 @@ -146,7 +146,7 @@
    14.4  /*
    14.5   * Event filter to fire controller events from joystick ones
    14.6   */
    14.7 -int SDL_GameControllerEventWatcher(void *userdata, SDL_Event * event)
    14.8 +static int SDL_GameControllerEventWatcher(void *userdata, SDL_Event * event)
    14.9  {
   14.10      switch(event->type) {
   14.11      case SDL_JOYAXISMOTION:
   14.12 @@ -291,7 +291,7 @@
   14.13  /*
   14.14   * Helper function to scan the mappings database for a controller with the specified GUID
   14.15   */
   14.16 -ControllerMapping_t *SDL_PrivateGetControllerMappingForGUID(SDL_JoystickGUID *guid)
   14.17 +static ControllerMapping_t *SDL_PrivateGetControllerMappingForGUID(SDL_JoystickGUID *guid)
   14.18  {
   14.19      ControllerMapping_t *pSupportedController = s_pSupportedControllers;
   14.20      while (pSupportedController) {
   14.21 @@ -389,7 +389,7 @@
   14.22  /*
   14.23   * given a controller button name and a joystick name update our mapping structure with it
   14.24   */
   14.25 -void SDL_PrivateGameControllerParseButton(const char *szGameButton, const char *szJoystickButton, struct _SDL_ControllerMapping *pMapping)
   14.26 +static void SDL_PrivateGameControllerParseButton(const char *szGameButton, const char *szJoystickButton, struct _SDL_ControllerMapping *pMapping)
   14.27  {
   14.28      int iSDLButton = 0;
   14.29      SDL_GameControllerButton button;
   14.30 @@ -502,7 +502,7 @@
   14.31  /*
   14.32   * Make a new button mapping struct
   14.33   */
   14.34 -void SDL_PrivateLoadButtonMapping(struct _SDL_ControllerMapping *pMapping, SDL_JoystickGUID guid, const char *pchName, const char *pchMapping)
   14.35 +static void SDL_PrivateLoadButtonMapping(struct _SDL_ControllerMapping *pMapping, SDL_JoystickGUID guid, const char *pchName, const char *pchMapping)
   14.36  {
   14.37      int j;
   14.38  
   14.39 @@ -538,7 +538,7 @@
   14.40  /*
   14.41   * grab the guid string from a mapping string
   14.42   */
   14.43 -char *SDL_PrivateGetControllerGUIDFromMappingString(const char *pMapping)
   14.44 +static char *SDL_PrivateGetControllerGUIDFromMappingString(const char *pMapping)
   14.45  {
   14.46      const char *pFirstComma = SDL_strchr(pMapping, ',');
   14.47      if (pFirstComma) {
   14.48 @@ -577,7 +577,7 @@
   14.49  /*
   14.50   * grab the name string from a mapping string
   14.51   */
   14.52 -char *SDL_PrivateGetControllerNameFromMappingString(const char *pMapping)
   14.53 +static char *SDL_PrivateGetControllerNameFromMappingString(const char *pMapping)
   14.54  {
   14.55      const char *pFirstComma, *pSecondComma;
   14.56      char *pchName;
   14.57 @@ -604,7 +604,7 @@
   14.58  /*
   14.59   * grab the button mapping string from a mapping string
   14.60   */
   14.61 -char *SDL_PrivateGetControllerMappingFromMappingString(const char *pMapping)
   14.62 +static char *SDL_PrivateGetControllerMappingFromMappingString(const char *pMapping)
   14.63  {
   14.64      const char *pFirstComma, *pSecondComma;
   14.65  
   14.66 @@ -622,7 +622,7 @@
   14.67  /*
   14.68   * Helper function to refresh a mapping
   14.69   */
   14.70 -void SDL_PrivateGameControllerRefreshMapping(ControllerMapping_t *pControllerMapping)
   14.71 +static void SDL_PrivateGameControllerRefreshMapping(ControllerMapping_t *pControllerMapping)
   14.72  {
   14.73      SDL_GameController *gamecontrollerlist = SDL_gamecontrollers;
   14.74      while (gamecontrollerlist) {
   14.75 @@ -699,7 +699,7 @@
   14.76  /*
   14.77   * Helper function to determine pre-calculated offset to certain joystick mappings
   14.78   */
   14.79 -ControllerMapping_t *SDL_PrivateGetControllerMapping(int device_index)
   14.80 +static ControllerMapping_t *SDL_PrivateGetControllerMapping(int device_index)
   14.81  {
   14.82      SDL_JoystickGUID jGUID = SDL_JoystickGetDeviceGUID(device_index);
   14.83      ControllerMapping_t *mapping;
    15.1 --- a/src/joystick/SDL_sysjoystick.h	Sun Nov 13 00:09:02 2016 -0800
    15.2 +++ b/src/joystick/SDL_sysjoystick.h	Sun Nov 13 22:57:41 2016 -0800
    15.3 @@ -67,10 +67,10 @@
    15.4  extern int SDL_SYS_JoystickInit(void);
    15.5  
    15.6  /* Function to return the number of joystick devices plugged in right now */
    15.7 -extern int SDL_SYS_NumJoysticks();
    15.8 +extern int SDL_SYS_NumJoysticks(void);
    15.9  
   15.10  /* Function to cause any queued joystick insertions to be processed */
   15.11 -extern void SDL_SYS_JoystickDetect();
   15.12 +extern void SDL_SYS_JoystickDetect(void);
   15.13  
   15.14  /* Function to get the device-dependent name of a joystick */
   15.15  extern const char *SDL_SYS_JoystickNameForDeviceIndex(int device_index);
    16.1 --- a/src/joystick/linux/SDL_sysjoystick.c	Sun Nov 13 00:09:02 2016 -0800
    16.2 +++ b/src/joystick/linux/SDL_sysjoystick.c	Sun Nov 13 22:57:41 2016 -0800
    16.3 @@ -282,6 +282,7 @@
    16.4  }
    16.5  #endif
    16.6  
    16.7 +#if ! SDL_USE_LIBUDEV
    16.8  static int
    16.9  JoystickInitWithoutUdev(void)
   16.10  {
   16.11 @@ -298,7 +299,7 @@
   16.12  
   16.13      return numjoysticks;
   16.14  }
   16.15 -
   16.16 +#endif
   16.17  
   16.18  #if SDL_USE_LIBUDEV
   16.19  static int
   16.20 @@ -342,9 +343,9 @@
   16.21  
   16.22  #if SDL_USE_LIBUDEV
   16.23      return JoystickInitWithUdev();
   16.24 +#else 
   16.25 +    return JoystickInitWithoutUdev();
   16.26  #endif
   16.27 -
   16.28 -    return JoystickInitWithoutUdev();
   16.29  }
   16.30  
   16.31  int SDL_SYS_NumJoysticks()
    17.1 --- a/src/power/SDL_power.c	Sun Nov 13 00:09:02 2016 -0800
    17.2 +++ b/src/power/SDL_power.c	Sun Nov 13 22:57:41 2016 -0800
    17.3 @@ -20,6 +20,7 @@
    17.4  */
    17.5  #include "../SDL_internal.h"
    17.6  #include "SDL_power.h"
    17.7 +#include "SDL_syspower.h"
    17.8  
    17.9  /*
   17.10   * Returns SDL_TRUE if we have a definitive answer.
   17.11 @@ -29,18 +30,6 @@
   17.12      (*SDL_GetPowerInfo_Impl) (SDL_PowerState * state, int *seconds,
   17.13                                int *percent);
   17.14  
   17.15 -SDL_bool SDL_GetPowerInfo_Linux_sys_class_power_supply(SDL_PowerState *, int *, int *);
   17.16 -SDL_bool SDL_GetPowerInfo_Linux_proc_acpi(SDL_PowerState *, int *, int *);
   17.17 -SDL_bool SDL_GetPowerInfo_Linux_proc_apm(SDL_PowerState *, int *, int *);
   17.18 -SDL_bool SDL_GetPowerInfo_Windows(SDL_PowerState *, int *, int *);
   17.19 -SDL_bool SDL_GetPowerInfo_MacOSX(SDL_PowerState *, int *, int *);
   17.20 -SDL_bool SDL_GetPowerInfo_Haiku(SDL_PowerState *, int *, int *);
   17.21 -SDL_bool SDL_GetPowerInfo_UIKit(SDL_PowerState *, int *, int *);
   17.22 -SDL_bool SDL_GetPowerInfo_Android(SDL_PowerState *, int *, int *);
   17.23 -SDL_bool SDL_GetPowerInfo_PSP(SDL_PowerState *, int *, int *);
   17.24 -SDL_bool SDL_GetPowerInfo_WinRT(SDL_PowerState *, int *, int *);
   17.25 -SDL_bool SDL_GetPowerInfo_Emscripten(SDL_PowerState *, int *, int *);
   17.26 -
   17.27  #ifndef SDL_POWER_DISABLED
   17.28  #ifdef SDL_POWER_HARDWIRED
   17.29  /* This is for things that _never_ have a battery */
    18.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    18.2 +++ b/src/power/SDL_syspower.h	Sun Nov 13 22:57:41 2016 -0800
    18.3 @@ -0,0 +1,68 @@
    18.4 +/*
    18.5 +  Simple DirectMedia Layer
    18.6 +  Copyright (C) 1997-2016 Sam Lantinga <slouken@libsdl.org>
    18.7 +
    18.8 +  This software is provided 'as-is', without any express or implied
    18.9 +  warranty.  In no event will the authors be held liable for any damages
   18.10 +  arising from the use of this software.
   18.11 +
   18.12 +  Permission is granted to anyone to use this software for any purpose,
   18.13 +  including commercial applications, and to alter it and redistribute it
   18.14 +  freely, subject to the following restrictions:
   18.15 +
   18.16 +  1. The origin of this software must not be misrepresented; you must not
   18.17 +     claim that you wrote the original software. If you use this software
   18.18 +     in a product, an acknowledgment in the product documentation would be
   18.19 +     appreciated but is not required.
   18.20 +  2. Altered source versions must be plainly marked as such, and must not be
   18.21 +     misrepresented as being the original software.
   18.22 +  3. This notice may not be removed or altered from any source distribution.
   18.23 +*/
   18.24 +#include "../SDL_internal.h"
   18.25 +
   18.26 +/* These are functions that need to be implemented by a port of SDL */
   18.27 +
   18.28 +#ifndef _SDL_syspower_h
   18.29 +#define _SDL_syspower_h
   18.30 +
   18.31 +#include "SDL_power.h"
   18.32 +
   18.33 +#ifndef SDL_POWER_DISABLED
   18.34 +#ifdef SDL_POWER_LINUX          /* in order of preference. More than could work. */
   18.35 +SDL_bool SDL_GetPowerInfo_Linux_sys_class_power_supply(SDL_PowerState *, int *, int *);
   18.36 +SDL_bool SDL_GetPowerInfo_Linux_proc_acpi(SDL_PowerState *, int *, int *);
   18.37 +SDL_bool SDL_GetPowerInfo_Linux_proc_apm(SDL_PowerState *, int *, int *);
   18.38 +#endif
   18.39 +#ifdef SDL_POWER_WINDOWS        /* handles Win32, Win64, PocketPC. */
   18.40 +SDL_bool SDL_GetPowerInfo_Windows(SDL_PowerState *, int *, int *);
   18.41 +#endif
   18.42 +#ifdef SDL_POWER_UIKIT          /* handles iPhone/iPad/etc */
   18.43 +SDL_bool SDL_GetPowerInfo_UIKit(SDL_PowerState *, int *, int *);
   18.44 +#endif
   18.45 +#ifdef SDL_POWER_MACOSX         /* handles Mac OS X, Darwin. */
   18.46 +SDL_bool SDL_GetPowerInfo_MacOSX(SDL_PowerState *, int *, int *);
   18.47 +#endif
   18.48 +#ifdef SDL_POWER_HAIKU          /* with BeOS euc.jp apm driver. Does this work on Haiku? */
   18.49 +SDL_bool SDL_GetPowerInfo_Haiku(SDL_PowerState *, int *, int *);
   18.50 +#endif
   18.51 +#ifdef SDL_POWER_ANDROID        /* handles Android. */
   18.52 +SDL_bool SDL_GetPowerInfo_Android(SDL_PowerState *, int *, int *);
   18.53 +#endif
   18.54 +#ifdef SDL_POWER_PSP        /* handles PSP. */
   18.55 +SDL_bool SDL_GetPowerInfo_PSP(SDL_PowerState *, int *, int *);
   18.56 +#endif
   18.57 +#ifdef SDL_POWER_WINRT          /* handles WinRT */
   18.58 +SDL_bool SDL_GetPowerInfo_WinRT(SDL_PowerState *, int *, int *);
   18.59 +#endif
   18.60 +#ifdef SDL_POWER_EMSCRIPTEN     /* handles Emscripten */
   18.61 +SDL_bool SDL_GetPowerInfo_Emscripten(SDL_PowerState *, int *, int *);
   18.62 +#endif
   18.63 +
   18.64 +#ifdef SDL_POWER_HARDWIRED
   18.65 +SDL_bool SDL_GetPowerInfo_Hardwired(SDL_PowerState *, int *, int *);
   18.66 +#endif
   18.67 +#endif
   18.68 +
   18.69 +#endif /* _SDL_syspower_h */
   18.70 +
   18.71 +/* vi: set ts=4 sw=4 expandtab: */
    19.1 --- a/src/power/linux/SDL_syspower.c	Sun Nov 13 00:09:02 2016 -0800
    19.2 +++ b/src/power/linux/SDL_syspower.c	Sun Nov 13 22:57:41 2016 -0800
    19.3 @@ -32,6 +32,7 @@
    19.4  #include <fcntl.h>
    19.5  
    19.6  #include "SDL_power.h"
    19.7 +#include "../SDL_syspower.h"
    19.8  
    19.9  static const char *proc_apm_path = "/proc/apm";
   19.10  static const char *proc_acpi_battery_path = "/proc/acpi/battery";
    20.1 --- a/src/render/opengl/SDL_shaders_gl.h	Sun Nov 13 00:09:02 2016 -0800
    20.2 +++ b/src/render/opengl/SDL_shaders_gl.h	Sun Nov 13 22:57:41 2016 -0800
    20.3 @@ -34,7 +34,7 @@
    20.4  
    20.5  typedef struct GL_ShaderContext GL_ShaderContext;
    20.6  
    20.7 -extern GL_ShaderContext * GL_CreateShaderContext();
    20.8 +extern GL_ShaderContext * GL_CreateShaderContext(void);
    20.9  extern void GL_SelectShader(GL_ShaderContext *ctx, GL_Shader shader);
   20.10  extern void GL_DestroyShaderContext(GL_ShaderContext *ctx);
   20.11  
    21.1 --- a/src/render/opengles/SDL_render_gles.c	Sun Nov 13 00:09:02 2016 -0800
    21.2 +++ b/src/render/opengles/SDL_render_gles.c	Sun Nov 13 22:57:41 2016 -0800
    21.3 @@ -214,7 +214,7 @@
    21.4  
    21.5  static SDL_GLContext SDL_CurrentContext = NULL;
    21.6  
    21.7 -GLES_FBOList *
    21.8 +static GLES_FBOList *
    21.9  GLES_GetFBO(GLES_RenderData *data, Uint32 w, Uint32 h)
   21.10  {
   21.11     GLES_FBOList *result = data->framebuffers;
    22.1 --- a/src/render/opengles2/SDL_render_gles2.c	Sun Nov 13 00:09:02 2016 -0800
    22.2 +++ b/src/render/opengles2/SDL_render_gles2.c	Sun Nov 13 22:57:41 2016 -0800
    22.3 @@ -307,7 +307,7 @@
    22.4      return 0;
    22.5  }
    22.6  
    22.7 -GLES2_FBOList *
    22.8 +static GLES2_FBOList *
    22.9  GLES2_GetFBO(GLES2_DriverContext *data, Uint32 w, Uint32 h)
   22.10  {
   22.11     GLES2_FBOList *result = data->framebuffers;
   22.12 @@ -1923,7 +1923,9 @@
   22.13   * Renderer instantiation                                                                        *
   22.14   *************************************************************************************************/
   22.15  
   22.16 +#ifdef ZUNE_HD
   22.17  #define GL_NVIDIA_PLATFORM_BINARY_NV 0x890B
   22.18 +#endif
   22.19  
   22.20  static void
   22.21  GLES2_ResetState(SDL_Renderer *renderer)
   22.22 @@ -1963,7 +1965,7 @@
   22.23  #ifndef ZUNE_HD
   22.24      GLboolean hasCompiler;
   22.25  #endif
   22.26 -    Uint32 window_flags;
   22.27 +    Uint32 window_flags = 0; /* -Wconditional-uninitialized */
   22.28      GLint window_framebuffer;
   22.29      GLint value;
   22.30      int profile_mask = 0, major = 0, minor = 0;
    23.1 --- a/src/render/software/SDL_blendfillrect.c	Sun Nov 13 00:09:02 2016 -0800
    23.2 +++ b/src/render/software/SDL_blendfillrect.c	Sun Nov 13 22:57:41 2016 -0800
    23.3 @@ -245,7 +245,7 @@
    23.4              } else {
    23.5                  return SDL_BlendFillRect_ARGB8888(dst, rect, blendMode, r, g, b, a);
    23.6              }
    23.7 -            break;
    23.8 +            /* break; -Wunreachable-code-break */
    23.9          }
   23.10          break;
   23.11      default:
    24.1 --- a/src/render/software/SDL_blendline.c	Sun Nov 13 00:09:02 2016 -0800
    24.2 +++ b/src/render/software/SDL_blendline.c	Sun Nov 13 22:57:41 2016 -0800
    24.3 @@ -685,7 +685,7 @@
    24.4          } else {
    24.5              return SDL_BlendLine_RGB2;
    24.6          }
    24.7 -        break;
    24.8 +        /* break; -Wunreachable-code-break */
    24.9      case 4:
   24.10          if (fmt->Rmask == 0x00FF0000) {
   24.11              if (fmt->Amask) {
    25.1 --- a/src/render/software/SDL_blendpoint.c	Sun Nov 13 00:09:02 2016 -0800
    25.2 +++ b/src/render/software/SDL_blendpoint.c	Sun Nov 13 22:57:41 2016 -0800
    25.3 @@ -235,13 +235,11 @@
    25.4          switch (dst->format->Rmask) {
    25.5          case 0x00FF0000:
    25.6              if (!dst->format->Amask) {
    25.7 -                return SDL_BlendPoint_RGB888(dst, x, y, blendMode, r, g, b,
    25.8 -                                             a);
    25.9 +                return SDL_BlendPoint_RGB888(dst, x, y, blendMode, r, g, b, a);
   25.10              } else {
   25.11 -                return SDL_BlendPoint_ARGB8888(dst, x, y, blendMode, r, g, b,
   25.12 -                                               a);
   25.13 +                return SDL_BlendPoint_ARGB8888(dst, x, y, blendMode, r, g, b, a);
   25.14              }
   25.15 -            break;
   25.16 +            /* break; -Wunreachable-code-break */
   25.17          }
   25.18          break;
   25.19      default:
    26.1 --- a/src/render/software/SDL_rotate.c	Sun Nov 13 00:09:02 2016 -0800
    26.2 +++ b/src/render/software/SDL_rotate.c	Sun Nov 13 22:57:41 2016 -0800
    26.3 @@ -79,7 +79,7 @@
    26.4  /* !
    26.5  \brief Lower limit of absolute zoom factor or rotation degrees.
    26.6  */
    26.7 -#define VALUE_LIMIT 0.001
    26.8 +/* #define VALUE_LIMIT 0.001 */
    26.9  
   26.10  /* !
   26.11  \brief Returns colorkey info for a surface
    27.1 --- a/src/stdlib/SDL_string.c	Sun Nov 13 00:09:02 2016 -0800
    27.2 +++ b/src/stdlib/SDL_string.c	Sun Nov 13 22:57:41 2016 -0800
    27.3 @@ -28,9 +28,10 @@
    27.4  
    27.5  #include "SDL_stdinc.h"
    27.6  
    27.7 -
    27.8 +#if !defined(HAVE_VSSCANF) || !defined(HAVE_STRTOL) || !defined(HAVE_STRTOUL)  || !defined(HAVE_STRTOLL) || !defined(HAVE_STRTOULL) || !defined(HAVE_STRTOD)
    27.9  #define SDL_isupperhex(X)   (((X) >= 'A') && ((X) <= 'F'))
   27.10  #define SDL_islowerhex(X)   (((X) >= 'a') && ((X) <= 'f'))
   27.11 +#endif
   27.12  
   27.13  #define UTF8_IsLeadByte(c) ((c) >= 0xC0 && (c) <= 0xF4)
   27.14  #define UTF8_IsTrailingByte(c) ((c) >= 0x80 && (c) <= 0xBF)
    28.1 --- a/src/test/SDL_test_crc32.c	Sun Nov 13 00:09:02 2016 -0800
    28.2 +++ b/src/test/SDL_test_crc32.c	Sun Nov 13 22:57:41 2016 -0800
    28.3 @@ -69,7 +69,7 @@
    28.4  }
    28.5  
    28.6  /* Complete CRC32 calculation on a memory block */
    28.7 -
    28.8 +/* un-used
    28.9  int SDLTest_Crc32Calc(SDLTest_Crc32Context * crcContext, CrcUint8 *inBuf, CrcUint32 inLen, CrcUint32 *crc32)
   28.10  {
   28.11    if (SDLTest_Crc32CalcStart(crcContext,crc32)) {
   28.12 @@ -86,6 +86,7 @@
   28.13  
   28.14    return 0;
   28.15  }
   28.16 +*/
   28.17  
   28.18  /* Start crc calculation */
   28.19  
    29.1 --- a/src/test/SDL_test_fuzzer.c	Sun Nov 13 00:09:02 2016 -0800
    29.2 +++ b/src/test/SDL_test_fuzzer.c	Sun Nov 13 22:57:41 2016 -0800
    29.3 @@ -196,7 +196,7 @@
    29.4   *
    29.5   * \returns Returns a random boundary value for the domain or 0 in case of error
    29.6   */
    29.7 -Uint64
    29.8 +static Uint64
    29.9  SDLTest_GenerateUnsignedBoundaryValues(const Uint64 maxValue, Uint64 boundary1, Uint64 boundary2, SDL_bool validDomain)
   29.10  {
   29.11          Uint64 b1, b2;
   29.12 @@ -328,7 +328,7 @@
   29.13   *
   29.14   * \returns Returns a random boundary value for the domain or 0 in case of error
   29.15   */
   29.16 -Sint64
   29.17 +static Sint64
   29.18  SDLTest_GenerateSignedBoundaryValues(const Sint64 minValue, const Sint64 maxValue, Sint64 boundary1, Sint64 boundary2, SDL_bool validDomain)
   29.19  {
   29.20          Sint64 b1, b2;
    30.1 --- a/src/test/SDL_test_harness.c	Sun Nov 13 00:09:02 2016 -0800
    30.2 +++ b/src/test/SDL_test_harness.c	Sun Nov 13 22:57:41 2016 -0800
    30.3 @@ -50,7 +50,7 @@
    30.4  *
    30.5  * \returns The generated seed string
    30.6  */
    30.7 -char *
    30.8 +static char *
    30.9  SDLTest_GenerateRunSeed(const int length)
   30.10  {
   30.11      char *seed = NULL;
   30.12 @@ -97,8 +97,8 @@
   30.13  * \returns The generated execution key to initialize the fuzzer with.
   30.14  *
   30.15  */
   30.16 -Uint64
   30.17 -SDLTest_GenerateExecKey(char *runSeed, char *suiteName, char *testName, int iteration)
   30.18 +static Uint64
   30.19 +SDLTest_GenerateExecKey(const char *runSeed, char *suiteName, char *testName, int iteration)
   30.20  {
   30.21      SDLTest_Md5Context md5Context;
   30.22      Uint64 *keys;
   30.23 @@ -168,7 +168,7 @@
   30.24  *
   30.25  * \return Timer id or -1 on failure.
   30.26  */
   30.27 -SDL_TimerID
   30.28 +static SDL_TimerID
   30.29  SDLTest_SetTestTimeout(int timeout, void (*callback)())
   30.30  {
   30.31      Uint32 timeoutInMilliseconds;
   30.32 @@ -206,8 +206,8 @@
   30.33  /**
   30.34  * \brief Timeout handler. Aborts test run and exits harness process.
   30.35  */
   30.36 -void
   30.37 -    SDLTest_BailOut()
   30.38 +static void
   30.39 +SDLTest_BailOut()
   30.40  {
   30.41      SDLTest_LogError("TestCaseTimeout timer expired. Aborting test run.");
   30.42      exit(TEST_ABORTED); /* bail out from the test */
   30.43 @@ -223,8 +223,8 @@
   30.44  *
   30.45  * \returns Test case result.
   30.46  */
   30.47 -int
   30.48 -SDLTest_RunTest(SDLTest_TestSuiteReference *testSuite, SDLTest_TestCaseReference *testCase, Uint64 execKey, SDL_bool forceTestRun)
   30.49 +static int
   30.50 +SDLTest_RunTest(SDLTest_TestSuiteReference *testSuite, const SDLTest_TestCaseReference *testCase, Uint64 execKey, SDL_bool forceTestRun)
   30.51  {
   30.52      SDL_TimerID timer = 0;
   30.53      int testCaseResult = 0;
   30.54 @@ -313,7 +313,8 @@
   30.55  }
   30.56  
   30.57  /* Prints summary of all suites/tests contained in the given reference */
   30.58 -void SDLTest_LogTestSuiteSummary(SDLTest_TestSuiteReference *testSuites)
   30.59 +#if 0 
   30.60 +static void SDLTest_LogTestSuiteSummary(SDLTest_TestSuiteReference *testSuites)
   30.61  {
   30.62      int suiteCounter;
   30.63      int testCounter;
   30.64 @@ -340,12 +341,13 @@
   30.65          }
   30.66      }
   30.67  }
   30.68 +#endif
   30.69  
   30.70  /* Gets a timer value in seconds */
   30.71 -float GetClock()
   30.72 +static float GetClock()
   30.73  {
   30.74 -    float currentClock = (float)clock();
   30.75 -    return currentClock / (float)CLOCKS_PER_SEC;
   30.76 +    float currentClock = clock() / (float) CLOCKS_PER_SEC;
   30.77 +    return currentClock;
   30.78  }
   30.79  
   30.80  /**
   30.81 @@ -370,7 +372,7 @@
   30.82      int testCounter;
   30.83      int iterationCounter;
   30.84      SDLTest_TestSuiteReference *testSuite;
   30.85 -    SDLTest_TestCaseReference *testCase;
   30.86 +    const SDLTest_TestCaseReference *testCase;
   30.87      const char *runSeed = NULL;
   30.88      char *currentSuiteName;
   30.89      char *currentTestName;
   30.90 @@ -396,7 +398,7 @@
   30.91      Uint32 testPassedCount = 0;
   30.92      Uint32 testSkippedCount = 0;
   30.93      Uint32 countSum = 0;
   30.94 -    SDLTest_TestCaseReference **failedTests;
   30.95 +    const SDLTest_TestCaseReference **failedTests;
   30.96  
   30.97      /* Sanitize test iterations */
   30.98      if (testIterations < 1) {
   30.99 @@ -440,7 +442,7 @@
  30.100  	}
  30.101  
  30.102  	/* Pre-allocate an array for tracking failed tests (potentially all test cases) */
  30.103 -	failedTests = (SDLTest_TestCaseReference **)SDL_malloc(totalNumberOfTests * sizeof(SDLTest_TestCaseReference *));
  30.104 +	failedTests = (const SDLTest_TestCaseReference **)SDL_malloc(totalNumberOfTests * sizeof(SDLTest_TestCaseReference *));
  30.105  	if (failedTests == NULL) {	
  30.106  	   SDLTest_LogError("Unable to allocate cache for failed tests");
  30.107             SDL_Error(SDL_ENOMEM);	   
  30.108 @@ -466,7 +468,7 @@
  30.109              testCounter = 0;
  30.110              while (testSuite->testCases[testCounter] && testFilter == 0)
  30.111              {
  30.112 -                testCase=(SDLTest_TestCaseReference *)testSuite->testCases[testCounter];
  30.113 +                testCase = testSuite->testCases[testCounter];
  30.114                  testCounter++;
  30.115                  if (testCase->name != NULL && SDL_strcmp(filter, testCase->name) == 0) {
  30.116                      /* Matched a test name */
  30.117 @@ -521,7 +523,7 @@
  30.118              testCounter = 0;
  30.119              while(testSuite->testCases[testCounter])
  30.120              {
  30.121 -                testCase=(SDLTest_TestCaseReference *)testSuite->testCases[testCounter];
  30.122 +                testCase = testSuite->testCases[testCounter];
  30.123                  currentTestName = (char *)((testCase->name) ? testCase->name : SDLTEST_INVALID_NAME_FORMAT);
  30.124                  testCounter++;
  30.125  
  30.126 @@ -562,7 +564,7 @@
  30.127                          if (userExecKey != 0) {
  30.128                              execKey = userExecKey;
  30.129                          } else {
  30.130 -                            execKey = SDLTest_GenerateExecKey((char *)runSeed, testSuite->name, testCase->name, iterationCounter);
  30.131 +                            execKey = SDLTest_GenerateExecKey(runSeed, testSuite->name, testCase->name, iterationCounter);
  30.132                          }
  30.133  
  30.134                          SDLTest_Log("Test Iteration %i: execKey %" SDL_PRIu64, iterationCounter, execKey);
    31.1 --- a/src/test/SDL_test_imageBlit.c	Sun Nov 13 00:09:02 2016 -0800
    31.2 +++ b/src/test/SDL_test_imageBlit.c	Sun Nov 13 22:57:41 2016 -0800
    31.3 @@ -24,7 +24,7 @@
    31.4  
    31.5  /* GIMP RGB C-Source image dump (blit.c) */
    31.6  
    31.7 -const SDLTest_SurfaceImage_t SDLTest_imageBlit = {
    31.8 +static const SDLTest_SurfaceImage_t SDLTest_imageBlit = {
    31.9    80, 60, 3,
   31.10    "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
   31.11    "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
   31.12 @@ -561,7 +561,7 @@
   31.13     return surface;
   31.14  }
   31.15  
   31.16 -const SDLTest_SurfaceImage_t SDLTest_imageBlitColor = {
   31.17 +static const SDLTest_SurfaceImage_t SDLTest_imageBlitColor = {
   31.18    80, 60, 3,
   31.19    "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
   31.20    "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
   31.21 @@ -1044,7 +1044,7 @@
   31.22     return surface;
   31.23  }
   31.24  
   31.25 -const SDLTest_SurfaceImage_t SDLTest_imageBlitAlpha = {
   31.26 +static const SDLTest_SurfaceImage_t SDLTest_imageBlitAlpha = {
   31.27    80, 60, 3,
   31.28    "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
   31.29    "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
    32.1 --- a/src/test/SDL_test_imageBlitBlend.c	Sun Nov 13 00:09:02 2016 -0800
    32.2 +++ b/src/test/SDL_test_imageBlitBlend.c	Sun Nov 13 22:57:41 2016 -0800
    32.3 @@ -24,7 +24,7 @@
    32.4  
    32.5  /* GIMP RGB C-Source image dump (alpha.c) */
    32.6  
    32.7 -const SDLTest_SurfaceImage_t SDLTest_imageBlitBlendAdd = {
    32.8 +static const SDLTest_SurfaceImage_t SDLTest_imageBlitBlendAdd = {
    32.9    80, 60, 3,
   32.10    "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
   32.11    "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
   32.12 @@ -601,7 +601,7 @@
   32.13     return surface;
   32.14  }
   32.15  
   32.16 -const SDLTest_SurfaceImage_t SDLTest_imageBlitBlend = {
   32.17 +static const SDLTest_SurfaceImage_t SDLTest_imageBlitBlend = {
   32.18    80, 60, 3,
   32.19    "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
   32.20    "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
   32.21 @@ -1131,7 +1131,7 @@
   32.22     return surface;
   32.23  }
   32.24  
   32.25 -const SDLTest_SurfaceImage_t SDLTest_imageBlitBlendMod = {
   32.26 +static const SDLTest_SurfaceImage_t SDLTest_imageBlitBlendMod = {
   32.27    80, 60, 3,
   32.28    "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
   32.29    "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
   32.30 @@ -1561,7 +1561,7 @@
   32.31     return surface;
   32.32  }
   32.33  
   32.34 -const SDLTest_SurfaceImage_t SDLTest_imageBlitBlendNone = {
   32.35 +static const SDLTest_SurfaceImage_t SDLTest_imageBlitBlendNone = {
   32.36    80, 60, 3,
   32.37    "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377"
   32.38    "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377"
   32.39 @@ -2374,7 +2374,7 @@
   32.40     return surface;
   32.41  }
   32.42  
   32.43 -const SDLTest_SurfaceImage_t SDLTest_imageBlitBlendAll = {
   32.44 +static const SDLTest_SurfaceImage_t SDLTest_imageBlitBlendAll = {
   32.45    80, 60, 3,
   32.46    "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
   32.47    "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
    33.1 --- a/src/test/SDL_test_imageFace.c	Sun Nov 13 00:09:02 2016 -0800
    33.2 +++ b/src/test/SDL_test_imageFace.c	Sun Nov 13 22:57:41 2016 -0800
    33.3 @@ -24,7 +24,7 @@
    33.4  
    33.5  /* GIMP RGBA C-Source image dump (face.c) */
    33.6  
    33.7 -const SDLTest_SurfaceImage_t SDLTest_imageFace = {
    33.8 +static const SDLTest_SurfaceImage_t SDLTest_imageFace = {
    33.9    32, 32, 4,
   33.10    "\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377"
   33.11    "\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377"
    34.1 --- a/src/test/SDL_test_imagePrimitives.c	Sun Nov 13 00:09:02 2016 -0800
    34.2 +++ b/src/test/SDL_test_imagePrimitives.c	Sun Nov 13 22:57:41 2016 -0800
    34.3 @@ -24,7 +24,7 @@
    34.4  
    34.5  /* GIMP RGB C-Source image dump (primitives.c) */
    34.6  
    34.7 -const SDLTest_SurfaceImage_t SDLTest_imagePrimitives = {
    34.8 +static const SDLTest_SurfaceImage_t SDLTest_imagePrimitives = {
    34.9    80, 60, 3,
   34.10    "\5ii\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
   34.11    "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
    35.1 --- a/src/test/SDL_test_imagePrimitivesBlend.c	Sun Nov 13 00:09:02 2016 -0800
    35.2 +++ b/src/test/SDL_test_imagePrimitivesBlend.c	Sun Nov 13 22:57:41 2016 -0800
    35.3 @@ -24,7 +24,7 @@
    35.4  
    35.5  /* GIMP RGB C-Source image dump (alpha.c) */
    35.6  
    35.7 -const SDLTest_SurfaceImage_t SDLTest_imagePrimitivesBlend = {
    35.8 +static const SDLTest_SurfaceImage_t SDLTest_imagePrimitivesBlend = {
    35.9    80, 60, 3,
   35.10    "\260e\15\222\356/\37\313\15\36\330\17K\3745D\3471\0\20\0D\3502D\3502<\321"
   35.11    ",\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\0-\0\377\377"
    36.1 --- a/src/test/SDL_test_log.c	Sun Nov 13 00:09:02 2016 -0800
    36.2 +++ b/src/test/SDL_test_log.c	Sun Nov 13 22:57:41 2016 -0800
    36.3 @@ -50,7 +50,7 @@
    36.4   *
    36.5   * \return Ascii representation of the timestamp in localtime in the format '08/23/01 14:55:02'
    36.6   */
    36.7 -char *SDLTest_TimestampToString(const time_t timestamp)
    36.8 +static char *SDLTest_TimestampToString(const time_t timestamp)
    36.9  {
   36.10      time_t copy;
   36.11      static char buffer[64];
    37.1 --- a/src/thread/SDL_systhread.h	Sun Nov 13 00:09:02 2016 -0800
    37.2 +++ b/src/thread/SDL_systhread.h	Sun Nov 13 22:57:41 2016 -0800
    37.3 @@ -55,7 +55,7 @@
    37.4  extern void SDL_SYS_DetachThread(SDL_Thread * thread);
    37.5  
    37.6  /* Get the thread local storage for this thread */
    37.7 -extern SDL_TLSData *SDL_SYS_GetTLSData();
    37.8 +extern SDL_TLSData *SDL_SYS_GetTLSData(void);
    37.9  
   37.10  /* Set the thread local storage for this thread */
   37.11  extern int SDL_SYS_SetTLSData(SDL_TLSData *data);
    38.1 --- a/src/thread/SDL_thread_c.h	Sun Nov 13 00:09:02 2016 -0800
    38.2 +++ b/src/thread/SDL_thread_c.h	Sun Nov 13 22:57:41 2016 -0800
    38.3 @@ -82,7 +82,7 @@
    38.4     This is only intended as a fallback if getting real thread-local
    38.5     storage fails or isn't supported on this platform.
    38.6   */
    38.7 -extern SDL_TLSData *SDL_Generic_GetTLSData();
    38.8 +extern SDL_TLSData *SDL_Generic_GetTLSData(void);
    38.9  
   38.10  /* Set cross-platform, slow, thread local storage for this thread.
   38.11     This is only intended as a fallback if getting real thread-local
    39.1 --- a/src/thread/pthread/SDL_syscond.c	Sun Nov 13 00:09:02 2016 -0800
    39.2 +++ b/src/thread/pthread/SDL_syscond.c	Sun Nov 13 22:57:41 2016 -0800
    39.3 @@ -129,7 +129,7 @@
    39.4      switch (retval) {
    39.5      case EINTR:
    39.6          goto tryagain;
    39.7 -        break;
    39.8 +        /* break; -Wunreachable-code-break */
    39.9      case ETIMEDOUT:
   39.10          retval = SDL_MUTEX_TIMEDOUT;
   39.11          break;
    40.1 --- a/src/thread/pthread/SDL_systls.c	Sun Nov 13 00:09:02 2016 -0800
    40.2 +++ b/src/thread/pthread/SDL_systls.c	Sun Nov 13 22:57:41 2016 -0800
    40.3 @@ -20,6 +20,7 @@
    40.4  */
    40.5  #include "../../SDL_internal.h"
    40.6  #include "SDL_thread.h"
    40.7 +#include "../SDL_systhread.h"
    40.8  #include "../SDL_thread_c.h"
    40.9  
   40.10  #include <pthread.h>
    41.1 --- a/src/timer/unix/SDL_systimer.c	Sun Nov 13 00:09:02 2016 -0800
    41.2 +++ b/src/timer/unix/SDL_systimer.c	Sun Nov 13 22:57:41 2016 -0800
    41.3 @@ -29,6 +29,7 @@
    41.4  
    41.5  #include "SDL_timer.h"
    41.6  #include "SDL_assert.h"
    41.7 +#include "../SDL_timer_c.h"
    41.8  
    41.9  /* The clock_gettime provides monotonous time, so we should use it if
   41.10     it's available. The clock_gettime function is behind ifdef
    42.1 --- a/src/video/SDL_RLEaccel.c	Sun Nov 13 00:09:02 2016 -0800
    42.2 +++ b/src/video/SDL_RLEaccel.c	Sun Nov 13 22:57:41 2016 -0800
    42.3 @@ -90,9 +90,11 @@
    42.4  #include "SDL_blit.h"
    42.5  #include "SDL_RLEaccel_c.h"
    42.6  
    42.7 +/*
    42.8  #ifndef MAX
    42.9  #define MAX(a, b) ((a) > (b) ? (a) : (b))
   42.10  #endif
   42.11 +*/
   42.12  #ifndef MIN
   42.13  #define MIN(a, b) ((a) < (b) ? (a) : (b))
   42.14  #endif
    43.1 --- a/src/video/SDL_blit_1.c	Sun Nov 13 00:09:02 2016 -0800
    43.2 +++ b/src/video/SDL_blit_1.c	Sun Nov 13 22:57:41 2016 -0800
    43.3 @@ -70,12 +70,14 @@
    43.4  }
    43.5  
    43.6  /* This is now endian dependent */
    43.7 -#if ( SDL_BYTEORDER == SDL_LIL_ENDIAN )
    43.8 -#define HI	1
    43.9 -#define LO	0
   43.10 -#else /* ( SDL_BYTEORDER == SDL_BIG_ENDIAN ) */
   43.11 -#define HI	0
   43.12 -#define LO	1
   43.13 +#ifndef USE_DUFFS_LOOP
   43.14 +# if ( SDL_BYTEORDER == SDL_LIL_ENDIAN )
   43.15 +#  define HI	1
   43.16 +#  define LO	0
   43.17 +# else /* ( SDL_BYTEORDER == SDL_BIG_ENDIAN ) */
   43.18 +#  define HI	0
   43.19 +#  define LO	1
   43.20 +# endif
   43.21  #endif
   43.22  static void
   43.23  Blit1to2(SDL_BlitInfo * info)
    44.1 --- a/src/video/SDL_bmp.c	Sun Nov 13 00:09:02 2016 -0800
    44.2 +++ b/src/video/SDL_bmp.c	Sun Nov 13 22:57:41 2016 -0800
    44.3 @@ -43,8 +43,8 @@
    44.4  /* Compression encodings for BMP files */
    44.5  #ifndef BI_RGB
    44.6  #define BI_RGB      0
    44.7 -#define BI_RLE8     1
    44.8 -#define BI_RLE4     2
    44.9 +/* #define BI_RLE8     1 */
   44.10 +/* #define BI_RLE4     2 */
   44.11  #define BI_BITFIELDS    3
   44.12  #endif
   44.13  
    45.1 --- a/src/video/SDL_video.c	Sun Nov 13 00:09:02 2016 -0800
    45.2 +++ b/src/video/SDL_video.c	Sun Nov 13 22:57:41 2016 -0800
    45.3 @@ -46,9 +46,11 @@
    45.4  #include "SDL_opengles2.h"
    45.5  #endif /* SDL_VIDEO_OPENGL_ES2 && !SDL_VIDEO_OPENGL */
    45.6  
    45.7 +#if !SDL_VIDEO_OPENGL
    45.8  #ifndef GL_CONTEXT_RELEASE_BEHAVIOR_KHR
    45.9  #define GL_CONTEXT_RELEASE_BEHAVIOR_KHR 0x82FB
   45.10  #endif
   45.11 +#endif
   45.12  
   45.13  /* On Windows, windows.h defines CreateWindow */
   45.14  #ifdef CreateWindow
   45.15 @@ -3617,8 +3619,9 @@
   45.16  #include "x11/SDL_x11messagebox.h"
   45.17  #endif
   45.18  
   45.19 -// This function will be unused if none of the above video drivers are present.
   45.20 -SDL_UNUSED static SDL_bool SDL_MessageboxValidForDriver(const SDL_MessageBoxData *messageboxdata, SDL_SYSWM_TYPE drivertype)
   45.21 +
   45.22 +#if SDL_VIDEO_DRIVER_WINDOWS || SDL_VIDEO_DRIVER_WINRT || SDL_VIDEO_DRIVER_COCOA || SDL_VIDEO_DRIVER_UIKIT || SDL_VIDEO_DRIVER_X11
   45.23 +static SDL_bool SDL_MessageboxValidForDriver(const SDL_MessageBoxData *messageboxdata, SDL_SYSWM_TYPE drivertype)
   45.24  {
   45.25      SDL_SysWMinfo info;
   45.26      SDL_Window *window = messageboxdata->window;
   45.27 @@ -3634,6 +3637,7 @@
   45.28          return (info.subsystem == drivertype);
   45.29      }
   45.30  }
   45.31 +#endif
   45.32  
   45.33  int
   45.34  SDL_ShowMessageBox(const SDL_MessageBoxData *messageboxdata, int *buttonid)
    46.1 --- a/src/video/x11/SDL_x11events.c	Sun Nov 13 00:09:02 2016 -0800
    46.2 +++ b/src/video/x11/SDL_x11events.c	Sun Nov 13 22:57:41 2016 -0800
    46.3 @@ -201,7 +201,7 @@
    46.4  
    46.5     On error, -1 is returned.
    46.6   */
    46.7 -int X11_URIDecode(char *buf, int len) {
    46.8 +static int X11_URIDecode(char *buf, int len) {
    46.9      int ri, wi, di;
   46.10      char decode = '\0';
   46.11      if (buf == NULL || len < 0) {
    47.1 --- a/src/video/x11/SDL_x11messagebox.c	Sun Nov 13 00:09:02 2016 -0800
    47.2 +++ b/src/video/x11/SDL_x11messagebox.c	Sun Nov 13 22:57:41 2016 -0800
    47.3 @@ -27,6 +27,7 @@
    47.4  #include "SDL_x11video.h"
    47.5  #include "SDL_x11dyn.h"
    47.6  #include "SDL_assert.h"
    47.7 +#include "SDL_x11messagebox.h"
    47.8  
    47.9  #include <X11/keysym.h>
   47.10  #include <locale.h>
    48.1 --- a/src/video/x11/SDL_x11modes.c	Sun Nov 13 00:09:02 2016 -0800
    48.2 +++ b/src/video/x11/SDL_x11modes.c	Sun Nov 13 22:57:41 2016 -0800
    48.3 @@ -134,14 +134,14 @@
    48.4              } else {
    48.5                  return SDL_PIXELFORMAT_INDEX4MSB;
    48.6              }
    48.7 -            break;
    48.8 +            /* break; -Wunreachable-code-break */
    48.9          case 1:
   48.10              if (BitmapBitOrder(display) == LSBFirst) {
   48.11                  return SDL_PIXELFORMAT_INDEX1LSB;
   48.12              } else {
   48.13                  return SDL_PIXELFORMAT_INDEX1MSB;
   48.14              }
   48.15 -            break;
   48.16 +            /* break; -Wunreachable-code-break */
   48.17          }
   48.18      }
   48.19  
   48.20 @@ -149,7 +149,7 @@
   48.21  }
   48.22  
   48.23  /* Global for the error handler */
   48.24 -int vm_event, vm_error = -1;
   48.25 +static int vm_event, vm_error = -1;
   48.26  
   48.27  #if SDL_VIDEO_DRIVER_X11_XINERAMA
   48.28  static SDL_bool
   48.29 @@ -349,7 +349,7 @@
   48.30  }
   48.31  
   48.32  
   48.33 -int
   48.34 +static int
   48.35  X11_InitModes_XRandR(_THIS)
   48.36  {
   48.37      SDL_VideoData *data = (SDL_VideoData *) _this->driverdata;
   48.38 @@ -569,7 +569,7 @@
   48.39                                                           info->vtotal)) : 0;
   48.40  }
   48.41  
   48.42 -SDL_bool
   48.43 +static SDL_bool
   48.44  SetXVidModeModeInfo(const XF86VidModeModeInfo *info, SDL_DisplayMode *mode)
   48.45  {
   48.46      mode->w = info->hdisplay;
   48.47 @@ -584,7 +584,7 @@
   48.48  X11_InitModes(_THIS)
   48.49  {
   48.50      SDL_VideoData *data = (SDL_VideoData *) _this->driverdata;
   48.51 -    int snum, screen, screencount;
   48.52 +    int snum, screen, screencount = 0;
   48.53  #if SDL_VIDEO_DRIVER_X11_XINERAMA
   48.54      int xinerama_major, xinerama_minor;
   48.55      int use_xinerama = 0;
    49.1 --- a/src/video/x11/SDL_x11opengl.c	Sun Nov 13 00:09:02 2016 -0800
    49.2 +++ b/src/video/x11/SDL_x11opengl.c	Sun Nov 13 22:57:41 2016 -0800
    49.3 @@ -519,6 +519,7 @@
    49.4      return vinfo;
    49.5  }
    49.6  
    49.7 +#if 0
    49.8  #ifndef GLXBadContext
    49.9  #define GLXBadContext 0
   49.10  #endif
   49.11 @@ -528,6 +529,8 @@
   49.12  #ifndef GLXBadProfileARB
   49.13  #define GLXBadProfileARB 13
   49.14  #endif
   49.15 +#endif
   49.16 +
   49.17  static int (*handler) (Display *, XErrorEvent *) = NULL;
   49.18  static const char *errorHandlerOperation = NULL;
   49.19  static int errorBase = 0;
    50.1 --- a/src/video/x11/SDL_x11window.c	Sun Nov 13 00:09:02 2016 -0800
    50.2 +++ b/src/video/x11/SDL_x11window.c	Sun Nov 13 22:57:41 2016 -0800
    50.3 @@ -44,7 +44,7 @@
    50.4  
    50.5  #define _NET_WM_STATE_REMOVE    0l
    50.6  #define _NET_WM_STATE_ADD       1l
    50.7 -#define _NET_WM_STATE_TOGGLE    2l
    50.8 +/* #define _NET_WM_STATE_TOGGLE    2l */
    50.9  
   50.10  static Bool isMapNotify(Display *dpy, XEvent *ev, XPointer win)
   50.11  {