From a432628df636b077d1690d121a3fd3d0457f26f4 Mon Sep 17 00:00:00 2001 From: Patrick Pelissier Date: Thu, 25 Jun 2020 21:18:01 +0200 Subject: [PATCH] Fix warnings for CLANG/WINDOWS (#61) --- m-core.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/m-core.h b/m-core.h index 2a366fd2..ae24057a 100644 --- a/m-core.h +++ b/m-core.h @@ -1562,7 +1562,7 @@ m_core_fopen(const char filename[], const char opt[]) static inline bool m_core_fscan_bool (bool *ptr, FILE *f) { - char c = fgetc(f); + int c = fgetc(f); *ptr = (c == '1'); return (c == '0' || c == '1'); } @@ -1871,7 +1871,7 @@ static inline unsigned int m_core_clz32(uint32_t limb) shift -= (limb < 0x10000UL); shift -= (limb < 0x100UL); shift = shift*8 + 24; - shift = 24 - shift + M_CORE_CLZ_TAB[limb >> shift ]; + shift = 24 - shift + (unsigned int) M_CORE_CLZ_TAB[limb >> shift ]; return shift; } @@ -1896,7 +1896,7 @@ static inline unsigned int m_core_clz64(uint64_t limb) shift -= (limb < 0x10000UL); shift -= (limb < 0x100UL); shift = shift*8 + 56; - shift = 56 - shift + M_CORE_CLZ_TAB[limb >> shift ]; + shift = 56 - shift + (unsigned int) M_CORE_CLZ_TAB[limb >> shift ]; return shift; } #endif