diff options
author | Biswapriyo Nath <nathbappai@gmail.com> | 2022-02-18 12:06:08 +0530 |
---|---|---|
committer | Biswapriyo Nath <nathbappai@gmail.com> | 2022-02-18 12:06:08 +0530 |
commit | cf89fc6338945fb9e1be4532cc9e98c58b77f121 (patch) | |
tree | 01472a4785b8b6698d4d07ed216db6bbc89e241b | |
parent | 817569dfad79732233fb86649c89e04387ce02e9 (diff) |
Fix strict function prototype warnings
Fix warning: function declaration isn't a prototype [-Wstrict-prototypes]
In C int foo() and int foo(void) are different functions.
-rw-r--r-- | src/os.c | 10 |
1 files changed, 5 insertions, 5 deletions
@@ -107,7 +107,7 @@ bool _mi_os_has_overcommit(void) { } // OS (small) page size -size_t _mi_os_page_size() { +size_t _mi_os_page_size(void) { return os_page_size; } @@ -159,7 +159,7 @@ static PGetCurrentProcessorNumberEx pGetCurrentProcessorNumberEx = NULL; static PGetNumaProcessorNodeEx pGetNumaProcessorNodeEx = NULL; static PGetNumaNodeProcessorMaskEx pGetNumaNodeProcessorMaskEx = NULL; -static bool mi_win_enable_large_os_pages() +static bool mi_win_enable_large_os_pages(void) { if (large_os_page_size > 0) return true; @@ -230,7 +230,7 @@ void _mi_os_init(void) } } #elif defined(__wasi__) -void _mi_os_init() { +void _mi_os_init(void) { os_overcommit = false; os_page_size = 64*MI_KiB; // WebAssembly has a fixed page size: 64KiB os_alloc_granularity = 16; @@ -261,7 +261,7 @@ static void os_detect_overcommit(void) { #endif } -void _mi_os_init() { +void _mi_os_init(void) { // get the page size long result = sysconf(_SC_PAGESIZE); if (result > 0) { @@ -1302,7 +1302,7 @@ void _mi_os_free_huge_pages(void* p, size_t size, mi_stats_t* stats) { Support NUMA aware allocation -----------------------------------------------------------------------------*/ #ifdef _WIN32 -static size_t mi_os_numa_nodex() { +static size_t mi_os_numa_nodex(void) { USHORT numa_node = 0; if (pGetCurrentProcessorNumberEx != NULL && pGetNumaProcessorNodeEx != NULL) { // Extended API is supported |