Fix compiler warnings
authorJimb Esser <wasteland@gmail.com>
Mon, 16 Mar 2020 14:49:20 -0700
changeset 13637118aed2f33e6
parent 13636 40c8eec2d15c
child 13638 ca87b62e4e17
Fix compiler warnings
src/joystick/hidapi/SDL_hidapi_gamecube.c
src/joystick/hidapi/SDL_hidapi_ps4.c
src/joystick/hidapi/SDL_hidapi_switch.c
src/joystick/hidapi/SDL_hidapi_xbox360.c
src/joystick/hidapi/SDL_hidapi_xbox360w.c
src/joystick/hidapi/SDL_hidapi_xboxone.c
     1.1 --- a/src/joystick/hidapi/SDL_hidapi_gamecube.c	Mon Mar 16 17:19:18 2020 -0400
     1.2 +++ b/src/joystick/hidapi/SDL_hidapi_gamecube.c	Mon Mar 16 14:49:20 2020 -0700
     1.3 @@ -404,7 +404,8 @@
     1.4      HIDAPI_DriverGameCube_OpenJoystick,
     1.5      HIDAPI_DriverGameCube_RumbleJoystick,
     1.6      HIDAPI_DriverGameCube_CloseJoystick,
     1.7 -    HIDAPI_DriverGameCube_FreeDevice
     1.8 +    HIDAPI_DriverGameCube_FreeDevice,
     1.9 +    NULL,
    1.10  };
    1.11  
    1.12  #endif /* SDL_JOYSTICK_HIDAPI_GAMECUBE */
     2.1 --- a/src/joystick/hidapi/SDL_hidapi_ps4.c	Mon Mar 16 17:19:18 2020 -0400
     2.2 +++ b/src/joystick/hidapi/SDL_hidapi_ps4.c	Mon Mar 16 14:49:20 2020 -0700
     2.3 @@ -529,7 +529,8 @@
     2.4      HIDAPI_DriverPS4_OpenJoystick,
     2.5      HIDAPI_DriverPS4_RumbleJoystick,
     2.6      HIDAPI_DriverPS4_CloseJoystick,
     2.7 -    HIDAPI_DriverPS4_FreeDevice
     2.8 +    HIDAPI_DriverPS4_FreeDevice,
     2.9 +    NULL
    2.10  };
    2.11  
    2.12  #endif /* SDL_JOYSTICK_HIDAPI_PS4 */
     3.1 --- a/src/joystick/hidapi/SDL_hidapi_switch.c	Mon Mar 16 17:19:18 2020 -0400
     3.2 +++ b/src/joystick/hidapi/SDL_hidapi_switch.c	Mon Mar 16 14:49:20 2020 -0700
     3.3 @@ -1164,7 +1164,8 @@
     3.4      HIDAPI_DriverSwitch_OpenJoystick,
     3.5      HIDAPI_DriverSwitch_RumbleJoystick,
     3.6      HIDAPI_DriverSwitch_CloseJoystick,
     3.7 -    HIDAPI_DriverSwitch_FreeDevice
     3.8 +    HIDAPI_DriverSwitch_FreeDevice,
     3.9 +    NULL
    3.10  };
    3.11  
    3.12  #endif /* SDL_JOYSTICK_HIDAPI_SWITCH */
     4.1 --- a/src/joystick/hidapi/SDL_hidapi_xbox360.c	Mon Mar 16 17:19:18 2020 -0400
     4.2 +++ b/src/joystick/hidapi/SDL_hidapi_xbox360.c	Mon Mar 16 14:49:20 2020 -0700
     4.3 @@ -991,6 +991,7 @@
     4.4  static void
     4.5  HIDAPI_DriverXbox360_UpdateOtherAPIs(SDL_HIDAPI_Device *device, SDL_Joystick *joystick)
     4.6  {
     4.7 +#if defined(SDL_JOYSTICK_HIDAPI_WINDOWS_MATCHING) || defined(SDL_JOYSTICK_HIDAPI_WINDOWS_XINPUT) || defined(SDL_JOYSTICK_HIDAPI_WINDOWS_GAMING_INPUT)
     4.8      SDL_DriverXbox360_Context *ctx = (SDL_DriverXbox360_Context *)device->context;
     4.9      SDL_bool has_trigger_data = SDL_FALSE;
    4.10      SDL_bool correlated = SDL_FALSE;
    4.11 @@ -1215,7 +1216,7 @@
    4.12          }
    4.13      }
    4.14  #endif
    4.15 -
    4.16 +#endif
    4.17  }
    4.18  
    4.19  static SDL_bool
     5.1 --- a/src/joystick/hidapi/SDL_hidapi_xbox360w.c	Mon Mar 16 17:19:18 2020 -0400
     5.2 +++ b/src/joystick/hidapi/SDL_hidapi_xbox360w.c	Mon Mar 16 14:49:20 2020 -0700
     5.3 @@ -296,7 +296,8 @@
     5.4      HIDAPI_DriverXbox360W_OpenJoystick,
     5.5      HIDAPI_DriverXbox360W_RumbleJoystick,
     5.6      HIDAPI_DriverXbox360W_CloseJoystick,
     5.7 -    HIDAPI_DriverXbox360W_FreeDevice
     5.8 +    HIDAPI_DriverXbox360W_FreeDevice,
     5.9 +    NULL
    5.10  };
    5.11  
    5.12  #endif /* SDL_JOYSTICK_HIDAPI_XBOX360 */
     6.1 --- a/src/joystick/hidapi/SDL_hidapi_xboxone.c	Mon Mar 16 17:19:18 2020 -0400
     6.2 +++ b/src/joystick/hidapi/SDL_hidapi_xboxone.c	Mon Mar 16 14:49:20 2020 -0700
     6.3 @@ -763,7 +763,7 @@
     6.4  
     6.5      if (size < 0) {
     6.6          /* Read error, device is disconnected */
     6.7 -        HIDAPI_JoystickDisconnected(device, joystick->instance_id);
     6.8 +        HIDAPI_JoystickDisconnected(device, joystick->instance_id, SDL_FALSE);
     6.9      }
    6.10      return (size >= 0);
    6.11  }
    6.12 @@ -796,7 +796,8 @@
    6.13      HIDAPI_DriverXboxOne_OpenJoystick,
    6.14      HIDAPI_DriverXboxOne_RumbleJoystick,
    6.15      HIDAPI_DriverXboxOne_CloseJoystick,
    6.16 -    HIDAPI_DriverXboxOne_FreeDevice
    6.17 +    HIDAPI_DriverXboxOne_FreeDevice,
    6.18 +    NULL
    6.19  };
    6.20  
    6.21  #endif /* SDL_JOYSTICK_HIDAPI_XBOXONE */