diff options
| author | Andreas Fenkart <andreas.fenkart@digitalstrom.com> | 2016-12-05 10:47:16 +0100 |
|---|---|---|
| committer | Moyster <oysterized@gmail.com> | 2018-11-30 01:18:13 +0100 |
| commit | b2fcfa4dd718a7040ab7316d85ac8892eb342389 (patch) | |
| tree | 236fb0393244149d42a4494dcdbc5437b79d1908 /fs | |
| parent | afe0e25e7c35177aee3e73ccb29ff6cca615b3c9 (diff) | |
gcc6: remove overflow warning in bitshift operation
The final logical and limits the result the 32bit. Adding interim
logical and to ensure the compiler an overflow never happens
Signed-off-by: Andreas Fenkart <andreas.fenkart@digitalstrom.com>
Diffstat (limited to 'fs')
| -rw-r--r-- | fs/compat_ioctl.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/compat_ioctl.c b/fs/compat_ioctl.c index 11172f872..f6c770319 100644 --- a/fs/compat_ioctl.c +++ b/fs/compat_ioctl.c @@ -808,7 +808,7 @@ static int compat_ioctl_preallocate(struct file *file, * simple reversible transform to make our table more evenly * distributed after sorting. */ -#define XFORM(i) (((i) ^ ((i) << 27) ^ ((i) << 17)) & 0xffffffff) +#define XFORM(i) (((i) ^ (((i) & 0x1f) << 27) ^ (((i) & 0x7fff) << 17)) & 0xffffffff) #define COMPATIBLE_IOCTL(cmd) XFORM(cmd), /* ioctl should not be warned about even if it's not implemented. |
