summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/malloc/malloc.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/malloc/malloc.c b/src/malloc/malloc.c
index 1a1a51f4..207b6ef2 100644
--- a/src/malloc/malloc.c
+++ b/src/malloc/malloc.c
@@ -120,14 +120,14 @@ static int bin_index(size_t x)
x = x / SIZE_ALIGN - 1;
if (x <= 32) return x;
if (x > 0x1c00) return 63;
- return ((union { float v; uint32_t r; }){ x }.r>>21) - 496;
+ return ((union { float v; uint32_t r; }){(int)x}.r>>21) - 496;
}
static int bin_index_up(size_t x)
{
x = x / SIZE_ALIGN - 1;
if (x <= 32) return x;
- return ((union { float v; uint32_t r; }){ x }.r+0x1fffff>>21) - 496;
+ return ((union { float v; uint32_t r; }){(int)x}.r+0x1fffff>>21) - 496;
}
#if 0