Project

General

Profile

Actions

Bug #8323

closed

ndmpd: left shift of the negative value

Added by Toomas Soome about 5 years ago. Updated about 5 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
cmd - userland programs
Start date:
2017-06-04
Due date:
% Done:

100%

Estimated time:
Difficulty:
Bite-size
Tags:
Gerrit CR:

Description

Build issue from gcc 6:

tlm/tlm_bitmap.c: In function 'bmp_set':
tlm/tlm_bitmap.c:80:29: error: left shift of negative value [-Werror=shift-negative-value]
 #define BMAP_BPW_MASK (~(~0 << BMAP_BPW_SHIFT))
                             ^
tlm/tlm_bitmap.c:328:20: note: in expansion of macro 'BMAP_BPW_MASK'
   mask = 1 <<(bn & BMAP_BPW_MASK);
                    ^~~~~~~~~~~~~
tlm/tlm_bitmap.c:80:29: error: left shift of negative value [-Werror=shift-negative-value]
 #define BMAP_BPW_MASK (~(~0 << BMAP_BPW_SHIFT))
                             ^
tlm/tlm_bitmap.c:330:20: note: in expansion of macro 'BMAP_BPW_MASK'
   v = (*vp <<(bn & BMAP_BPW_MASK)) & mask;
                    ^~~~~~~~~~~~~
tlm/tlm_bitmap.c: In function 'bmp_get':
tlm/tlm_bitmap.c:80:29: error: left shift of negative value [-Werror=shift-negative-value]
 #define BMAP_BPW_MASK (~(~0 << BMAP_BPW_SHIFT))
                             ^
tlm/tlm_bitmap.c:353:19: note: in expansion of macro 'BMAP_BPW_MASK'
   bit = 1 <<(bn & BMAP_BPW_MASK);
                   ^~~~~~~~~~~~~
tlm/tlm_bitmap.c: In function 'dbmp_set':
tlm/tlm_bitmap.c:80:29: error: left shift of negative value [-Werror=shift-negative-value]
 #define BMAP_BPW_MASK (~(~0 << BMAP_BPW_SHIFT))
                             ^
tlm/tlm_bitmap.c:861:20: note: in expansion of macro 'BMAP_BPW_MASK'
   mask = 1 <<(bn & BMAP_BPW_MASK);
                    ^~~~~~~~~~~~~
tlm/tlm_bitmap.c:80:29: error: left shift of negative value [-Werror=shift-negative-value]
 #define BMAP_BPW_MASK (~(~0 << BMAP_BPW_SHIFT))
                             ^
tlm/tlm_bitmap.c:863:20: note: in expansion of macro 'BMAP_BPW_MASK'
   v = (*vp <<(bn & BMAP_BPW_MASK)) & mask;
                    ^~~~~~~~~~~~~
tlm/tlm_bitmap.c: In function 'dbmp_get':
tlm/tlm_bitmap.c:80:29: error: left shift of negative value [-Werror=shift-negative-value]
 #define BMAP_BPW_MASK (~(~0 << BMAP_BPW_SHIFT))
                             ^
tlm/tlm_bitmap.c:899:19: note: in expansion of macro 'BMAP_BPW_MASK'
   bit = 1 <<(bn & BMAP_BPW_MASK);
                   ^~~~~~~~~~~~~
cc1: all warnings being treated as errors

Actions

Also available in: Atom PDF