Opened 3 years ago

Last modified 3 years ago

#118 closed defect

Incorrect bit shift warning — at Version 1

Reported by: Thierry Delisle Owned by: a3moss
Priority: major Component: cfa-cc
Version: 1.0 Keywords:

Description (last modified by Thierry Delisle)

The following code:

extern "C" {
#include <sys/sysmacros.h>

int main() { return 0; }

produces the following warning

/usr/include/x86_64-linux-gnu/sys/sysmacros.h: In function ‘gnu_dev_major’:
/usr/include/x86_64-linux-gnu/sys/sysmacros.h:41:145: warning: right shift count >= width of type [-Wshift-count-overflow]
   return ((__dev >> 8) & 0xfff) | ((unsigned int) (__dev >> 32) & ~0xfff);

Command used :

cfa-1.0 -Wall -Wextra -O2 

Change History (1)

comment:1 Changed 3 years ago by Thierry Delisle

Description: modified (diff)
Note: See TracTickets for help on using tickets.