diff options
author | Noel Power <noel.power@suse.com> | 2019-05-22 13:07:28 +0000 |
---|---|---|
committer | Andreas Schneider <asn@cryptomilk.org> | 2019-06-04 22:13:07 +0000 |
commit | 43500e4134cfa875d7ba71c2150760c97dded2c8 (patch) | |
tree | 3e5e1588ea17ad11ed322c7ddb46746761e5a969 /source4 | |
parent | c8cdc016b4c53109454f25ee675d083b556cc134 (diff) | |
download | samba-43500e4134cfa875d7ba71c2150760c97dded2c8.tar.gz |
s4/torture/smb2: cppcheck: Fix shiftTooManyBitsSigned error
Fixes
source4/torture/smb2/notify.c:974: error: shiftTooManyBitsSigned: Shifting signed 32-bit value by 31 bits is undefined behaviour <--[cppcheck]
source4/torture/smb2/notify.c:994: error: shiftTooManyBitsSigned: Shifting signed 32-bit value by 31 bits is undefined behaviour <--[cppcheck]
source4/torture/smb2/notify.c:1002: error: shiftTooManyBitsSigned: Shifting signed 32-bit value by 31 bits is undefined behaviour <--[cppcheck]
source4/torture/smb2/notify.c:1011: error: shiftTooManyBitsSigned: Shifting signed 32-bit value by 31 bits is undefined behaviour <--[cppcheck]
source4/torture/smb2/notify.c:1025: error: shiftTooManyBitsSigned: Shifting signed 32-bit value by 31 bits is undefined behaviour <--[cppcheck]
source4/torture/smb2/notify.c:1040: error: shiftTooManyBitsSigned: Shifting signed 32-bit value by 31 bits is undefined behaviour <--[cppcheck]
source4/torture/smb2/notify.c:1048: error: shiftTooManyBitsSigned: Shifting signed 32-bit value by 31 bits is undefined behaviour <--[cppcheck]
source4/torture/smb2/notify.c:1062: error: shiftTooManyBitsSigned: Shifting signed 32-bit value by 31 bits is undefined behaviour <--[cppcheck]
source4/torture/smb2/notify.c:1081: error: shiftTooManyBitsSigned: Shifting signed 32-bit value by 31 bits is undefined behaviour <--[cppcheck]
source4/torture/smb2/notify.c:1096: error: shiftTooManyBitsSigned: Shifting signed 32-bit value by 31 bits is undefined behaviour <--[cppcheck]
source4/torture/smb2/notify.c:1112: error: shiftTooManyBitsSigned: Shifting signed 32-bit value by 31 bits is undefined behaviour <--[cppcheck]
source4/torture/smb2/notify.c:1125: 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/smb2/notify.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/source4/torture/smb2/notify.c b/source4/torture/smb2/notify.c index 9b8a44fd49b..d8aa44f5d4c 100644 --- a/source4/torture/smb2/notify.c +++ b/source4/torture/smb2/notify.c @@ -913,7 +913,7 @@ static bool torture_smb2_notify_mask(struct torture_context *torture, h1 = io.smb2.out.file.handle; \ setup \ notify.smb2.in.file.handle = h1; \ - notify.smb2.in.completion_filter = (1<<i); \ + notify.smb2.in.completion_filter = ((uint32_t)1<<i); \ /* cancel initial requests so the buffer is setup */ \ req = smb2_notify_send(tree1, &(notify.smb2)); \ smb2_cancel(req); \ @@ -965,7 +965,7 @@ static bool torture_smb2_notify_mask(struct torture_context *torture, notify.smb2.out.changes[0].name.s); \ ret = false; \ } \ - mask |= (1<<i); \ + mask |= ((uint32_t)1<<i); \ } \ } while (0); \ } while (0); |