mirror of
https://github.com/libsdl-org/SDL.git
synced 2025-10-13 05:16:01 +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.
This commit is contained in:
@@ -454,7 +454,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;
|
||||
@@ -472,7 +472,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++) {
|
||||
@@ -486,7 +486,7 @@ static void usb_string_cache_destroy()
|
||||
usb_string_cache_insert_pos = 0;
|
||||
}
|
||||
|
||||
static struct usb_string_cache_entry *usb_string_cache_insert()
|
||||
static struct usb_string_cache_entry *usb_string_cache_insert(void)
|
||||
{
|
||||
struct usb_string_cache_entry *new_entry = NULL;
|
||||
if (usb_string_cache_insert_pos >= usb_string_cache_size) {
|
||||
|
@@ -119,7 +119,7 @@ static HMODULE hid_lib_handle = NULL;
|
||||
static HMODULE cfgmgr32_lib_handle = NULL;
|
||||
static BOOLEAN hidapi_initialized = FALSE;
|
||||
|
||||
static void free_library_handles()
|
||||
static void free_library_handles(void)
|
||||
{
|
||||
if (hid_lib_handle)
|
||||
FreeLibrary(hid_lib_handle);
|
||||
@@ -134,7 +134,7 @@ static void free_library_handles()
|
||||
# pragma GCC diagnostic ignored "-Wcast-function-type"
|
||||
#endif
|
||||
|
||||
static int lookup_functions()
|
||||
static int lookup_functions(void)
|
||||
{
|
||||
hid_lib_handle = LoadLibraryW(L"hid.dll");
|
||||
if (hid_lib_handle == NULL) {
|
||||
@@ -221,7 +221,7 @@ static BOOL IsWindowsVersionOrGreater(WORD wMajorVersion, WORD wMinorVersion, WO
|
||||
return VerifyVersionInfoW(&osvi, VER_MAJORVERSION | VER_MINORVERSION | VER_SERVICEPACKMAJOR, dwlConditionMask) != FALSE;
|
||||
}
|
||||
|
||||
static hid_device *new_hid_device()
|
||||
static hid_device *new_hid_device(void)
|
||||
{
|
||||
hid_device *dev = (hid_device*) calloc(1, sizeof(hid_device));
|
||||
|
||||
|
Reference in New Issue
Block a user