mirror of
https://github.com/libsdl-org/SDL.git
synced 2025-10-18 07:41:45 +00:00
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:
@@ -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++) {
|
||||
|
@@ -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);
|
||||
|
@@ -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) {
|
||||
|
Reference in New Issue
Block a user