Patrick Georgi has submitted this change and it was merged. ( https://review.coreboot.org/c/coreboot/+/23361 )
Change subject: lib/libgcc.c: Fix shift warnings ......................................................................
lib/libgcc.c: Fix shift warnings
``` if (!(a & (0xffff << 16))) { ^~ src/lib/libgcc.c:40:18: error: result of '255 << 24' requires 33 bits to represent, but 'int' only has 32 bits [-Werror=shift-overflow=] if (!(a & (0xff << 24))) { ^~ src/lib/libgcc.c:45:17: error: result of '15 << 28' requires 33 bits to represent, but 'int' only has 32 bits [-Werror=shift-overflow=] if (!(a & (0xf << 28))) { ^~ ```
Change-Id: I7bdd75c20a76b303743d7e7e0d3a6503760284fd Signed-off-by: Paul Menzel pmenzel@molgen.mpg.de Reviewed-on: https://review.coreboot.org/c/23361 Tested-by: build bot (Jenkins) no-reply@coreboot.org Reviewed-by: Patrick Rudolph siro@das-labor.org Reviewed-by: Julius Werner jwerner@chromium.org Reviewed-by: HAOUAS Elyes ehaouas@noos.fr --- M src/lib/libgcc.c 1 file changed, 3 insertions(+), 3 deletions(-)
Approvals: build bot (Jenkins): Verified HAOUAS Elyes: Looks good to me, but someone else must approve Julius Werner: Looks good to me, approved Patrick Rudolph: Looks good to me, but someone else must approve
diff --git a/src/lib/libgcc.c b/src/lib/libgcc.c index 369346c..99a0749 100644 --- a/src/lib/libgcc.c +++ b/src/lib/libgcc.c @@ -32,17 +32,17 @@ }; int r = 0;
- if (!(a & (0xffff << 16))) { + if (!(a & (0xffffU << 16))) { r += 16; a <<= 16; }
- if (!(a & (0xff << 24))) { + if (!(a & (0xffU << 24))) { r += 8; a <<= 8; }
- if (!(a & (0xf << 28))) { + if (!(a & (0xfU << 28))) { r += 4; a <<= 4; }