Make VT_STRUCT_MASK unsigned

avoids a (overly anal, but correct) undefined behaviour warning
about shifting 4095 as int by 20.
This commit is contained in:
Michael Matz 2019-06-22 00:42:24 +02:00
parent e6d8f9a8bb
commit 7894f39e65

2
tcc.h
View File

@ -889,7 +889,7 @@ struct filespec {
/* currently unused: 0x000[1248]0000 */
#define VT_STRUCT_SHIFT 20 /* shift for bitfield shift values (32 - 2*6) */
#define VT_STRUCT_MASK (((1 << (6+6)) - 1) << VT_STRUCT_SHIFT | VT_BITFIELD)
#define VT_STRUCT_MASK (((1U << (6+6)) - 1) << VT_STRUCT_SHIFT | VT_BITFIELD)
#define BIT_POS(t) (((t) >> VT_STRUCT_SHIFT) & 0x3f)
#define BIT_SIZE(t) (((t) >> (VT_STRUCT_SHIFT + 6)) & 0x3f)