commit e949bf64e01c9a2de41eb3a4479db0e58cd4caa6
Author: Mattias Andrée <maandree_AT_kth.se>
AuthorDate: Mon Mar 14 01:00:26 2016 +0100
Commit: Mattias Andrée <maandree_AT_kth.se>
CommitDate: Mon Mar 14 01:00:26 2016 +0100
Fix so that no workaround is required.
Thanks to Alexis Megas.
Signed-off-by: Mattias Andrée <maandree_AT_kth.se>
diff --git a/src/allocator.c b/src/allocator.c
index e75546f..44f7985 100644
--- a/src/allocator.c
+++ b/src/allocator.c
_AT_@ -5,11 +5,6 @@
void
libzahl_realloc(z_t a, size_t need)
{
-#if defined(__clang__) /*
https://llvm.org/bugs/show_bug.cgi?id=26930 */
- volatile size_t j;
-#else
-# define j i
-#endif
size_t i, x;
zahl_char_t *new;
_AT_@ -18,7 +13,7 @@ libzahl_realloc(z_t a, size_t need)
need |= need >> 1;
need |= need >> 2;
need |= need >> 4;
- for (j = sizeof(need), x = 8; j; j >>= 1, x <<= 1)
+ for (i = sizeof(need), x = 8; (i >>= 1); x <<= 1)
need |= need >> x;
need += 1;
}
Received on Mon Mar 14 2016 - 01:02:12 CET