sparse: Also check bit_offset when checking implicit casts
commitb1c2600e2ce164fcebc507722905a008f8e2a442
authorFranz Schrober <franzschrober@yahoo.de>
Thu, 28 Nov 2013 10:16:22 +0000 (28 11:16 +0100)
committerChristopher Li <sparse@chrisli.org>
Fri, 29 Nov 2013 23:04:12 +0000 (29 15:04 -0800)
tree9f78663219fcac64988a9920aaa66b45fc603f37
parente13f6da038de3a0afaf1c48f76395cbccfb37f92
sparse: Also check bit_offset when checking implicit casts

The comparison in same_cast_type only checked the bit_size of the new and the
old symbol. The bit_offset was only compared with itself and thus would always
be true. Instead Linus most likely wanted to compare the bit_offset of the new
and the old symbol. This regression was introduced in
47f53396a1d62719c44941f84370ead80181728e ("If two implied casts end up undoing
each other, just remove them.").

Reported-by: James Westby <jw+debian@jameswestby.net>
Signed-off-by: Franz Schrober <franzschrober@yahoo.de>
Signed-off-by: Christopher Li <sparse@chrisli.org>
evaluate.c