From 65ce38a8199b8df4524e0ce883678a852de1b10a Mon Sep 17 00:00:00 2001 From: "H. Peter Anvin" Date: Sat, 29 Apr 2017 13:11:55 -0700 Subject: [PATCH] nasmlib/ilog2.c: force the shift in ROUND() to be an uint32_t Some compilers apparently warn on 1 << w for w == 31; fix it by explicitly making it UINT32_C(1). Signed-off-by: H. Peter Anvin --- nasmlib/ilog2.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/nasmlib/ilog2.c b/nasmlib/ilog2.c index 51c3e07a..1bd24dba 100644 --- a/nasmlib/ilog2.c +++ b/nasmlib/ilog2.c @@ -1,6 +1,6 @@ /* ----------------------------------------------------------------------- * * - * Copyright 1996-2016 The NASM Authors - All Rights Reserved + * Copyright 1996-2017 The NASM Authors - All Rights Reserved * See the file AUTHORS included with the NASM distribution for * the specific copyright holders. * @@ -35,12 +35,12 @@ #include "nasmlib.h" #include -#define ROUND(v, a, w) \ - do { \ - if (v & (((1 << w) - 1) << w)) { \ - a += w; \ - v >>= w; \ - } \ +#define ROUND(v, a, w) \ + do { \ + if (v & (((UINT32_C(1) << w) - 1) << w)) { \ + a += w; \ + v >>= w; \ + } \ } while (0)