[PATCH 13/14] fix out of range comparison in count_bits()
When compiling with CC=clang the following warning is emitted
makedumpfile.c:5763:15: warning: result of comparison of constant 255 with expression of type 'char' is always false [-Wtautological-constant-out-of-range-compare]
else if (*p == 0xff) {
This is because hex literals are considered unsigned while p is signed.
Thus *p can have a maximum value of 127 while 0xff is 255. This results
in the expression to be always false.
Signed-off-by:
Philipp Rudo <prudo@redhat.com>
Loading
Please sign in to comment