Fix warning for Android NDK compiler: "function declaration without a prototype is deprecated in all versions of C [-Wstrict-prototypes]"

https://stackoverflow.com/questions/42125/warning-error-function-declaration-isnt-a-prototype
In C int foo() and int foo(void) are different functions. int foo() accepts an arbitrary number of arguments, while int foo(void) accepts 0 arguments. In C++ they mean the same thing.
This commit is contained in:
Amir
2024-07-17 21:32:03 +04:00
committed by Sam Lantinga
parent 3f9591babe
commit ccade50587
89 changed files with 210 additions and 210 deletions

View File

@@ -86,7 +86,7 @@ static struct
#undef SDL_ARTS_SYM
static void UnloadARTSLibrary()
static void UnloadARTSLibrary(void)
{
if (arts_handle) {
SDL_UnloadObject(arts_handle);
@@ -119,7 +119,7 @@ static int LoadARTSLibrary(void)
#else
static void UnloadARTSLibrary()
static void UnloadARTSLibrary(void)
{
return;
}

View File

@@ -64,7 +64,7 @@ static struct
#undef SDL_ESD_SYM
static void UnloadESDLibrary()
static void UnloadESDLibrary(void)
{
if (esd_handle) {
SDL_UnloadObject(esd_handle);
@@ -96,7 +96,7 @@ static int LoadESDLibrary(void)
#else
static void UnloadESDLibrary()
static void UnloadESDLibrary(void)
{
return;
}

View File

@@ -77,7 +77,7 @@ static struct
#undef SDL_FS_SYM
static void UnloadFusionSoundLibrary()
static void UnloadFusionSoundLibrary(void)
{
if (fs_handle) {
SDL_UnloadObject(fs_handle);
@@ -110,7 +110,7 @@ static int LoadFusionSoundLibrary(void)
#else
static void UnloadFusionSoundLibrary()
static void UnloadFusionSoundLibrary(void)
{
return;
}

View File

@@ -142,13 +142,13 @@ static int pipewire_dlsym(const char *fn, void **addr)
return -1; \
}
static int load_pipewire_library()
static int load_pipewire_library(void)
{
pipewire_handle = SDL_LoadObject(pipewire_library);
return pipewire_handle ? 0 : -1;
}
static void unload_pipewire_library()
static void unload_pipewire_library(void)
{
if (pipewire_handle) {
SDL_UnloadObject(pipewire_handle);
@@ -160,18 +160,18 @@ static void unload_pipewire_library()
#define SDL_PIPEWIRE_SYM(x) PIPEWIRE_##x = x
static int load_pipewire_library()
static int load_pipewire_library(void)
{
return 0;
}
static void unload_pipewire_library()
static void unload_pipewire_library(void)
{ /* Nothing to do */
}
#endif /* SDL_AUDIO_DRIVER_PIPEWIRE_DYNAMIC */
static int load_pipewire_syms()
static int load_pipewire_syms(void)
{
SDL_PIPEWIRE_SYM(pw_get_library_version);
SDL_PIPEWIRE_SYM(pw_init);
@@ -212,7 +212,7 @@ SDL_FORCE_INLINE SDL_bool pipewire_version_at_least(int major, int minor, int pa
(pipewire_version_major > major || pipewire_version_minor > minor || pipewire_version_patch >= patch);
}
static int init_pipewire_library()
static int init_pipewire_library(void)
{
if (!load_pipewire_library()) {
if (!load_pipewire_syms()) {
@@ -234,7 +234,7 @@ static int init_pipewire_library()
return -1;
}
static void deinit_pipewire_library()
static void deinit_pipewire_library(void)
{
PIPEWIRE_pw_deinit();
unload_pipewire_library();
@@ -340,7 +340,7 @@ static void io_list_remove(Uint32 id)
}
}
static void io_list_sort()
static void io_list_sort(void)
{
struct io_node *default_sink = NULL, *default_source = NULL;
struct io_node *n, *temp;
@@ -365,7 +365,7 @@ static void io_list_sort()
}
}
static void io_list_clear()
static void io_list_clear(void)
{
struct io_node *n, *temp;
@@ -426,7 +426,7 @@ static void pending_list_remove(Uint32 id)
}
}
static void pending_list_clear()
static void pending_list_clear(void)
{
struct node_object *node, *temp;
@@ -751,7 +751,7 @@ static const struct pw_registry_events registry_events = { PW_VERSION_REGISTRY_E
.global_remove = registry_event_remove_callback };
/* The hotplug thread */
static int hotplug_loop_init()
static int hotplug_loop_init(void)
{
int res;
@@ -794,7 +794,7 @@ static int hotplug_loop_init()
return 0;
}
static void hotplug_loop_destroy()
static void hotplug_loop_destroy(void)
{
if (hotplug_loop) {
PIPEWIRE_pw_thread_loop_stop(hotplug_loop);
@@ -836,7 +836,7 @@ static void hotplug_loop_destroy()
}
}
static void PIPEWIRE_DetectDevices()
static void PIPEWIRE_DetectDevices(void)
{
struct io_node *io;
@@ -1342,7 +1342,7 @@ failed:
return ret;
}
static void PIPEWIRE_Deinitialize()
static void PIPEWIRE_Deinitialize(void)
{
if (pipewire_initialized) {
hotplug_loop_destroy();

View File

@@ -885,7 +885,7 @@ static int SDLCALL HotplugThread(void *data)
return 0;
}
static void PULSEAUDIO_DetectDevices()
static void PULSEAUDIO_DetectDevices(void)
{
SDL_sem *ready_sem = SDL_CreateSemaphore(0);