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.

(cherry picked from commit ccade50587)
This commit is contained in:
Amir
2024-07-17 21:32:03 +04:00
committed by Sam Lantinga
parent 279eb89ce5
commit e7a47e783b
89 changed files with 210 additions and 210 deletions

View File

@@ -519,7 +519,7 @@ static struct usb_string_cache_entry *usb_string_cache = NULL;
static size_t usb_string_cache_size = 0;
static size_t usb_string_cache_insert_pos = 0;
static int usb_string_cache_grow()
static int usb_string_cache_grow(void)
{
struct usb_string_cache_entry *new_cache;
size_t allocSize;
@@ -537,7 +537,7 @@ static int usb_string_cache_grow()
return 0;
}
static void usb_string_cache_destroy()
static void usb_string_cache_destroy(void)
{
size_t i;
for (i = 0; i < usb_string_cache_insert_pos; i++) {

View File

@@ -504,7 +504,7 @@ int HID_API_EXPORT hid_exit(void)
return 0;
}
static void process_pending_events() {
static void process_pending_events(void) {
SInt32 res;
do {
res = CFRunLoopRunInMode(kCFRunLoopDefaultMode, 0.001, FALSE);

View File

@@ -264,7 +264,7 @@ static void register_error(hid_device *device, const char *op)
}
#ifndef HIDAPI_USE_DDK
static int lookup_functions()
static int lookup_functions(void)
{
lib_handle = LoadLibrary(TEXT("hid.dll"));
if (lib_handle) {