From 50e5750bd8670b4cf4463471a2348d4c99c9d054 Mon Sep 17 00:00:00 2001 From: Behdad Esfahbod Date: Wed, 21 Oct 2015 11:10:10 -0200 Subject: [PATCH] Avoid unnecessary cast to 64-bit Fixes https://github.com/behdad/harfbuzz/issues/146 Or I think it should. --- src/hb-private.hh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/hb-private.hh b/src/hb-private.hh index 9db19eb4a..5ff144442 100644 --- a/src/hb-private.hh +++ b/src/hb-private.hh @@ -242,7 +242,7 @@ static inline unsigned int ARRAY_LENGTH (const Type (&)[n]) { return n; } /* Note: C++ allows sizeof() of variable-lengh arrays. So, if _cond is not * constant, it still compiles (ouch!), but at least we'll get a -Wvla warning. */ -#define ASSERT_STATIC_EXPR_ZERO(_cond) (0 * sizeof (char[(_cond) ? 1 : -1])) +#define ASSERT_STATIC_EXPR_ZERO(_cond) (0 * (unsigned int) sizeof (char[(_cond) ? 1 : -1])) #define _PASTE1(a,b) a##b #define PASTE(a,b) _PASTE1(a,b)