From a497fa9bc3fd66230270fa6cfd1c5cfd535451e6 Mon Sep 17 00:00:00 2001 From: Noel Power Date: Wed, 22 May 2019 13:10:47 +0000 Subject: [PATCH] s4/torture/unix: cppcheck: Fix shiftTooManyBitsSigned error Fixes source4/torture/unix/unix_info2.c:300: error: shiftTooManyBitsSigned: Shifting signed 32-bit value by 31 bits is undefined behaviour <--[cppcheck] Signed-off-by: Noel Power Reviewed-by: Andreas Schneider --- source4/torture/unix/unix_info2.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source4/torture/unix/unix_info2.c b/source4/torture/unix/unix_info2.c index 14f6d776081..069a5818e13 100644 --- a/source4/torture/unix/unix_info2.c +++ b/source4/torture/unix/unix_info2.c @@ -297,7 +297,7 @@ static bool verify_setinfo_flags(void *mem_ctx, * that flag is in our requested mask. */ for (i = 0; i < 32; ++i) { - info2.file_flags = (1 << i); + info2.file_flags = ((uint32_t)1 << i); info2.flags_mask = smb_fmask | info2.file_flags; set_no_metadata_change(&info2); -- 2.47.3