From e42a22c9ca58ac90d017de8405c188996ed94252 Mon Sep 17 00:00:00 2001 From: Daan Leijen Date: Mon, 28 Nov 2022 09:59:48 -0800 Subject: [PATCH] fix warnings --- src/options.c | 3 ++- test/test-wrong.c | 6 +++--- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/src/options.c b/src/options.c index 4fa5d5f8..4add09e0 100644 --- a/src/options.c +++ b/src/options.c @@ -106,7 +106,8 @@ void _mi_options_init(void) { for(int i = 0; i < _mi_option_last; i++ ) { mi_option_t option = (mi_option_t)i; long l = mi_option_get(option); MI_UNUSED(l); // initialize - if (option != mi_option_verbose) { + // if (option != mi_option_verbose) + { mi_option_desc_t* desc = &options[option]; _mi_verbose_message("option '%s': %ld\n", desc->name, desc->value); } diff --git a/test/test-wrong.c b/test/test-wrong.c index 8bf7767e..6c3d5a74 100644 --- a/test/test-wrong.c +++ b/test/test-wrong.c @@ -31,9 +31,9 @@ terms of the MIT license. A copy of the license can be found in the file #endif int main(int argc, char** argv) { - int* p = mi(malloc)(3*sizeof(int)); + int* p = (int*)mi(malloc)(3*sizeof(int)); - int* r = mi_malloc_aligned(8,16); + int* r = (int*)mi_malloc_aligned(8,16); mi_free(r); // illegal byte wise read @@ -42,7 +42,7 @@ int main(int argc, char** argv) { mi(free)(c); // undefined access - int* q = mi(malloc)(sizeof(int)); + int* q = (int*)mi(malloc)(sizeof(int)); printf("undefined: %d\n", *q); // illegal int read