summaryrefslogtreecommitdiff
path: root/source4
diff options
context:
space:
mode:
authorNoel Power <noel.power@suse.com>2019-05-22 11:24:43 +0000
committerAndreas Schneider <asn@cryptomilk.org>2019-06-04 22:13:07 +0000
commitbb00a7e018800c6d70d9d0937183961c7af970b9 (patch)
tree1366627ab4dea5a7cb29371725b154ee3b6101d1 /source4
parentf3f79a267ee656f22df01e8a7bb9d4db64e78781 (diff)
downloadsamba-bb00a7e018800c6d70d9d0937183961c7af970b9.tar.gz
s4/torture/raw: cppcheck: Fix shiftTooManyBitsSigned error
Fix source4/torture/raw/notify.c:831: error: shiftTooManyBitsSigned: Shifting signed 32-bit value by 31 bits is undefined behaviour <--[cppcheck] source4/torture/raw/notify.c:838: error: shiftTooManyBitsSigned: Shifting signed 32-bit value by 31 bits is undefined behaviour <--[cppcheck] source4/torture/raw/notify.c:849: error: shiftTooManyBitsSigned: Shifting signed 32-bit value by 31 bits is undefined behaviour <--[cppcheck] source4/torture/raw/notify.c:861: error: shiftTooManyBitsSigned: Shifting signed 32-bit value by 31 bits is undefined behaviour <--[cppcheck] source4/torture/raw/notify.c:869: error: shiftTooManyBitsSigned: Shifting signed 32-bit value by 31 bits is undefined behaviour <--[cppcheck] source4/torture/raw/notify.c:882: error: shiftTooManyBitsSigned: Shifting signed 32-bit value by 31 bits is undefined behaviour <--[cppcheck] source4/torture/raw/notify.c:892: error: shiftTooManyBitsSigned: Shifting signed 32-bit value by 31 bits is undefined behaviour <--[cppcheck] source4/torture/raw/notify.c:903: error: shiftTooManyBitsSigned: Shifting signed 32-bit value by 31 bits is undefined behaviour <--[cppcheck] source4/torture/raw/notify.c:914: error: shiftTooManyBitsSigned: Shifting signed 32-bit value by 31 bits is undefined behaviour <--[cppcheck] source4/torture/raw/notify.c:929: error: shiftTooManyBitsSigned: Shifting signed 32-bit value by 31 bits is undefined behaviour <--[cppcheck] source4/torture/raw/notify.c:941: error: shiftTooManyBitsSigned: Shifting signed 32-bit value by 31 bits is undefined behaviour <--[cppcheck] source4/torture/raw/notify.c:951: error: shiftTooManyBitsSigned: Shifting signed 32-bit value by 31 bits is undefined behaviour <--[cppcheck] source4/torture/raw/notify.c:961: error: shiftTooManyBitsSigned: Shifting signed 32-bit value by 31 bits is undefined behaviour <--[cppcheck] source4/torture/raw/notify.c:972: error: shiftTooManyBitsSigned: Shifting signed 32-bit value by 31 bits is undefined behaviour <--[cppcheck] source4/torture/raw/notify.c:982: error: shiftTooManyBitsSigned: Shifting signed 32-bit value by 31 bits is undefined behaviour <--[cppcheck] Signed-off-by: Noel Power <noel.power@suse.com> Reviewed-by: Andreas Schneider <asn@samba.org>
Diffstat (limited to 'source4')
-rw-r--r--source4/torture/raw/notify.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/source4/torture/raw/notify.c b/source4/torture/raw/notify.c
index fa32c6b5e21..881ad6b71cc 100644
--- a/source4/torture/raw/notify.c
+++ b/source4/torture/raw/notify.c
@@ -768,7 +768,7 @@ static bool test_notify_mask(struct torture_context *tctx,
fnum = io.ntcreatex.out.file.fnum; \
setup \
notify.nttrans.in.file.fnum = fnum; \
- notify.nttrans.in.completion_filter = (1<<i); \
+ notify.nttrans.in.completion_filter = ((uint32_t)1<<i); \
req = smb_raw_changenotify_send(cli->tree, &notify); \
smb_raw_chkpath(cli->tree, &chkpath); \
op \
@@ -817,7 +817,7 @@ static bool test_notify_mask(struct torture_context *tctx,
notify.nttrans.in.completion_filter, \
notify.nttrans.out.changes[0].name.s));\
} \
- mask |= (1<<i); \
+ mask |= ((uint32_t)1<<i); \
} \
if ((expected) != mask) { \
torture_assert_int_not_equal_goto(tctx, ((expected) & ~mask), \