fix warnings

This commit is contained in:
Daan Leijen 2022-11-28 09:59:48 -08:00
parent be2bc9e7ca
commit e42a22c9ca
2 changed files with 5 additions and 4 deletions

View File

@ -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);
}

View File

@ -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