From: Noel Power Date: Tue, 21 May 2019 10:52:56 +0000 (+0000) Subject: s3/libads: cppcheck fix error: shiftTooManyBitsSigned: error X-Git-Tag: ldb-2.0.5~572 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=f5af3cb21e2515096d0b21aabda238a1c8f3bab3;p=thirdparty%2Fsamba.git s3/libads: cppcheck fix error: shiftTooManyBitsSigned: error Squash 'Shifting signed 32-bit value by 31 bits is undefined behaviour' error Signed-off-by: Noel Power Reviewed-by: Andreas Schneider --- diff --git a/source3/libads/disp_sec.c b/source3/libads/disp_sec.c index 15c99b67176..0b5f117788a 100644 --- a/source3/libads/disp_sec.c +++ b/source3/libads/disp_sec.c @@ -73,7 +73,7 @@ static void ads_disp_perms(uint32_t type) } for (i = 0; i < 32; i++) { - if (type & (1 << i)) { + if (type & ((uint32_t)1 << i)) { for (j = 1; perms[j].str; j ++) { if (perms[j].mask == (((unsigned) 1) << i)) { printf("\n\t%s (0x%08x)", perms[j].str, perms[j].mask);