commit e949bf64e01c9a2de41eb3a4479db0e58cd4caa6
Author:     Mattias Andrée <[email protected]>
AuthorDate: Mon Mar 14 01:00:26 2016 +0100
Commit:     Mattias Andrée <[email protected]>
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 <[email protected]>

diff --git a/src/allocator.c b/src/allocator.c
index e75546f..44f7985 100644
--- a/src/allocator.c
+++ b/src/allocator.c
@@ -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;
 
@@ -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;
        }

Reply via email to