Opened 3 years ago

Last modified 3 years ago

#118 closed defect

Incorrect bit shift warning — at Initial Version

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

Description

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);

Change History (0)

Note: See TracTickets for help on using tickets.