From 959845540d8263ed08fea321f78313d9e89090ae Mon Sep 17 00:00:00 2001 From: daan Date: Sat, 13 Nov 2021 14:13:03 -0800 Subject: [PATCH] use W4 for msvc compilation --- ide/vs2019/mimalloc.vcxproj | 6 +++--- src/options.c | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/ide/vs2019/mimalloc.vcxproj b/ide/vs2019/mimalloc.vcxproj index 6c7e276c..c12955c3 100644 --- a/ide/vs2019/mimalloc.vcxproj +++ b/ide/vs2019/mimalloc.vcxproj @@ -92,7 +92,7 @@ - Level3 + Level4 Disabled true true @@ -138,7 +138,7 @@ - Level3 + Level4 MaxSpeed true true @@ -166,7 +166,7 @@ - Level3 + Level4 MaxSpeed true true diff --git a/src/options.c b/src/options.c index c40a187b..e3d6c8c9 100644 --- a/src/options.c +++ b/src/options.c @@ -113,7 +113,7 @@ void _mi_options_init(void) { mi_max_warning_count = mi_option_get(mi_option_max_warnings); } -long mi_option_get(mi_option_t option) { +mi_decl_nodiscard long mi_option_get(mi_option_t option) { mi_assert(option >= 0 && option < _mi_option_last); mi_option_desc_t* desc = &options[option]; mi_assert(desc->option == option); // index should match the option @@ -139,7 +139,7 @@ void mi_option_set_default(mi_option_t option, long value) { } } -bool mi_option_is_enabled(mi_option_t option) { +mi_decl_nodiscard bool mi_option_is_enabled(mi_option_t option) { return (mi_option_get(option) != 0); }