Skip to content

Commit c8b5b74

Browse files
committed
improve warnings
1 parent bb957fc commit c8b5b74

File tree

3 files changed

+5
-1
lines changed

3 files changed

+5
-1
lines changed

CMakeLists.txt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -172,6 +172,9 @@ if(CMAKE_C_COMPILER_ID MATCHES "AppleClang|Clang|GNU")
172172
if(CMAKE_C_COMPILER_ID MATCHES "GNU")
173173
list(APPEND mi_cflags -Wno-invalid-memory-model)
174174
endif()
175+
if(CMAKE_C_COMPILER_ID MATCHES "AppleClang|Clang")
176+
list(APPEND mi_cflags -Wpedantic -Wno-static-in-inline)
177+
endif()
175178
endif()
176179

177180
if(CMAKE_C_COMPILER_ID MATCHES "Intel")

src/alloc-override.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,7 @@ terms of the MIT license. A copy of the license can be found in the file
137137
void _ZdlPvmSt11align_val_t(void* p, size_t n, size_t al) { mi_free_size_aligned(p,n,al); }
138138
void _ZdaPvmSt11align_val_t(void* p, size_t n, size_t al) { mi_free_size_aligned(p,n,al); }
139139

140-
typedef struct mi_nothrow_s { } mi_nothrow_t;
140+
typedef struct mi_nothrow_s { int _tag; } mi_nothrow_t;
141141
#if (MI_INTPTR_SIZE==8)
142142
void* _Znwm(size_t n) MI_FORWARD1(mi_new,n); // new 64-bit
143143
void* _Znam(size_t n) MI_FORWARD1(mi_new,n); // new[] 64-bit

src/alloc.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -557,6 +557,7 @@ void* _mi_externs[] = {
557557
(void*)&_mi_page_malloc,
558558
(void*)&mi_malloc,
559559
(void*)&mi_malloc_small,
560+
(void*)&mi_zalloc_small,
560561
(void*)&mi_heap_malloc,
561562
(void*)&mi_heap_zalloc,
562563
(void*)&mi_heap_malloc_small

0 commit comments

Comments
 (0)