Commit d155b76e authored by Philipp Rudo's avatar Philipp Rudo Committed by Kazuhito Hagio
Browse files

[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: default avatarPhilipp Rudo <prudo@redhat.com>
parent 247afd6a
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment