diff --git a/CMakeLists.txt b/CMakeLists.txt index 9d4c1d40f..e4efae8dc 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -74,6 +74,8 @@ if(MSVC) set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} /we4146") # C4245: signed const to unsigned set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} /we4245") + # C4255: function declaration missing arguments + set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} /we4255") # C4305: truncation from double to float set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} /we4305") # C4701: potentially uninitialized local variable used diff --git a/src/controller/joystick.c b/src/controller/joystick.c index 7bc0b82c4..c780e95e9 100644 --- a/src/controller/joystick.c +++ b/src/controller/joystick.c @@ -209,7 +209,7 @@ int joystick_create(controller *ctrl, int joystick_id) { static vector every_gamepad; -void joystick_init() { +void joystick_init(void) { int num_joysticks = SDL_NumJoysticks(); vector_create_with_size(&every_gamepad, sizeof(SDL_GameController *), num_joysticks); @@ -218,7 +218,7 @@ void joystick_init() { } } -void joystick_close() { +void joystick_close(void) { iterator it; vector_iter_begin(&every_gamepad, &it); SDL_GameController **gamepad; diff --git a/src/controller/joystick.h b/src/controller/joystick.h index 654b86801..3012f7a36 100644 --- a/src/controller/joystick.h +++ b/src/controller/joystick.h @@ -28,8 +28,8 @@ int joystick_nth_id(int n); int joystick_name_to_id(const char *name, int offset); int joystick_offset(int id, const char *name); -void joystick_init(); -void joystick_close(); +void joystick_init(void); +void joystick_close(void); void joystick_menu_poll_all(controller *menu_ctrl, ctrl_event **ev); void joystick_deviceadded(int sdl_joystick_index); void joystick_deviceremoved(int sdl_joystick_instance_id);