Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion include/mimalloc-internal.h
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ static inline uintptr_t _mi_random_shuffle(uintptr_t x);
extern mi_decl_cache_align mi_stats_t _mi_stats_main;
extern mi_decl_cache_align const mi_page_t _mi_page_empty;
bool _mi_is_main_thread(void);
bool _mi_preloading(); // true while the C runtime is not ready
bool _mi_preloading(void); // true while the C runtime is not ready

// os.c
size_t _mi_os_page_size(void);
Expand Down
8 changes: 4 additions & 4 deletions src/alloc.c
Original file line number Diff line number Diff line change
Expand Up @@ -747,7 +747,7 @@ mi_decl_restrict char* mi_heap_realpath(mi_heap_t* heap, const char* fname, char
}
#else
#include <unistd.h> // pathconf
static size_t mi_path_max() {
static size_t mi_path_max(void) {
static size_t path_max = 0;
if (path_max <= 0) {
long m = pathconf("/",_PC_PATH_MAX);
Expand Down Expand Up @@ -807,13 +807,13 @@ static bool mi_try_new_handler(bool nothrow) {
}
}
#else
typedef void (*std_new_handler_t)();
typedef void (*std_new_handler_t)(void);

#if (defined(__GNUC__) || defined(__clang__))
std_new_handler_t __attribute((weak)) _ZSt15get_new_handlerv() {
std_new_handler_t __attribute((weak)) _ZSt15get_new_handlerv(void) {
return NULL;
}
static std_new_handler_t mi_get_new_handler() {
static std_new_handler_t mi_get_new_handler(void) {
return _ZSt15get_new_handlerv();
}
#else
Expand Down
2 changes: 1 addition & 1 deletion src/options.c
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ terms of the MIT license. A copy of the license can be found in the file
static uintptr_t mi_max_error_count = 16; // stop outputting errors after this
static uintptr_t mi_max_warning_count = 16; // stop outputting warnings after this

static void mi_add_stderr_output();
static void mi_add_stderr_output(void);

int mi_version(void) mi_attr_noexcept {
return MI_MALLOC_VERSION;
Expand Down
2 changes: 1 addition & 1 deletion src/os.c
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ size_t _mi_os_page_size() {
}

// if large OS pages are supported (2 or 4MiB), then return the size, otherwise return the small page size (4KiB)
size_t _mi_os_large_page_size() {
size_t _mi_os_large_page_size(void) {
return (large_os_page_size != 0 ? large_os_page_size : _mi_os_page_size());
}

Expand Down
2 changes: 1 addition & 1 deletion src/region.c
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ Possible issues:
#include "bitmap.h"

// Internal raw OS interface
size_t _mi_os_large_page_size();
size_t _mi_os_large_page_size(void);
bool _mi_os_protect(void* addr, size_t size);
bool _mi_os_unprotect(void* addr, size_t size);
bool _mi_os_commit(void* p, size_t size, bool* is_zero, mi_stats_t* stats);
Expand Down
10 changes: 5 additions & 5 deletions test/test-api.c
Original file line number Diff line number Diff line change
Expand Up @@ -64,15 +64,15 @@ static int failed = 0;
// ---------------------------------------------------------------------------
// Test functions
// ---------------------------------------------------------------------------
bool test_heap1();
bool test_heap2();
bool test_stl_allocator1();
bool test_stl_allocator2();
bool test_heap1(void);
bool test_heap2(void);
bool test_stl_allocator1(void);
bool test_stl_allocator2(void);

// ---------------------------------------------------------------------------
// Main testing
// ---------------------------------------------------------------------------
int main() {
int main(void) {
mi_option_disable(mi_option_verbose);

// ---------------------------------------------------
Expand Down