Re: [PATCH nd/struct-pathspec] declare 1-bit bitfields to be unsigned
- From
Nguyen Thai Ngoc Duy <pclouds@gmail.com>
- Date
- Mar 16, 2011, 14:20 UTC
- Message-ID
- <AANLkTi=0ifczJw-Thr-XD7JX0YbQbvczSYrWOTB-Pru9@mail.gmail.com>
- In-Reply-To
- <20110316034232.GA26027@elie>
2011/3/16 Jonathan Nieder <jrnieder@gmail.com>:
Show 5 quoted lines
> As "gcc -pedantic" notices, a two's complement 1-bit signed integer > cannot represent the value '1'. > > dir.c: In function 'init_pathspec': > dir.c:1291:4: warning: overflow in implicit constant conversion [-Woverflow]
Thanks. I think I was aware of this but neglected because they are used as booleans, 1 or -1 does not matter. Good fix anyway.
-- Duy