mirror of
https://github.com/microsoft/mimalloc.git
synced 2025-05-04 22:49:32 +03:00
fix warnings on latest macOS
This commit is contained in:
parent
6d18559014
commit
9535726528
2 changed files with 5 additions and 5 deletions
|
@ -240,7 +240,7 @@ void mi_register_output(mi_output_fun* out, void* arg) mi_attr_noexcept {
|
||||||
}
|
}
|
||||||
|
|
||||||
// add stderr to the delayed output after the module is loaded
|
// add stderr to the delayed output after the module is loaded
|
||||||
static void mi_add_stderr_output() {
|
static void mi_add_stderr_output(void) {
|
||||||
mi_assert_internal(mi_out_default == NULL);
|
mi_assert_internal(mi_out_default == NULL);
|
||||||
mi_out_buf_flush(&mi_out_stderr, false, NULL); // flush current contents to stderr
|
mi_out_buf_flush(&mi_out_stderr, false, NULL); // flush current contents to stderr
|
||||||
mi_out_default = &mi_out_buf_stderr; // and add stderr to the delayed output
|
mi_out_default = &mi_out_buf_stderr; // and add stderr to the delayed output
|
||||||
|
|
|
@ -286,7 +286,7 @@ int main(void) {
|
||||||
// Larger test functions
|
// Larger test functions
|
||||||
// ---------------------------------------------------
|
// ---------------------------------------------------
|
||||||
|
|
||||||
bool test_heap1() {
|
bool test_heap1(void) {
|
||||||
mi_heap_t* heap = mi_heap_new();
|
mi_heap_t* heap = mi_heap_new();
|
||||||
int* p1 = mi_heap_malloc_tp(heap,int);
|
int* p1 = mi_heap_malloc_tp(heap,int);
|
||||||
int* p2 = mi_heap_malloc_tp(heap,int);
|
int* p2 = mi_heap_malloc_tp(heap,int);
|
||||||
|
@ -295,7 +295,7 @@ bool test_heap1() {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool test_heap2() {
|
bool test_heap2(void) {
|
||||||
mi_heap_t* heap = mi_heap_new();
|
mi_heap_t* heap = mi_heap_new();
|
||||||
int* p1 = mi_heap_malloc_tp(heap,int);
|
int* p1 = mi_heap_malloc_tp(heap,int);
|
||||||
int* p2 = mi_heap_malloc_tp(heap,int);
|
int* p2 = mi_heap_malloc_tp(heap,int);
|
||||||
|
@ -306,7 +306,7 @@ bool test_heap2() {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool test_stl_allocator1() {
|
bool test_stl_allocator1(void) {
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
std::vector<int, mi_stl_allocator<int> > vec;
|
std::vector<int, mi_stl_allocator<int> > vec;
|
||||||
vec.push_back(1);
|
vec.push_back(1);
|
||||||
|
@ -319,7 +319,7 @@ bool test_stl_allocator1() {
|
||||||
|
|
||||||
struct some_struct { int i; int j; double z; };
|
struct some_struct { int i; int j; double z; };
|
||||||
|
|
||||||
bool test_stl_allocator2() {
|
bool test_stl_allocator2(void) {
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
std::vector<some_struct, mi_stl_allocator<some_struct> > vec;
|
std::vector<some_struct, mi_stl_allocator<some_struct> > vec;
|
||||||
vec.push_back(some_struct());
|
vec.push_back(some_struct());
|
||||||
|
|
Loading…
Add table
Reference in a new issue