core: Change bit_start and bit_end to uint32_t in class__find_holes()

And they were being compared against uint32_t variables, resulting in
this clang warning:

  /var/home/acme/git/pahole/dwarves.c: In function ‘class__find_holes’:
  /var/home/acme/git/pahole/dwarves.c:1453:73: warning: comparison of integer expressions of different signedness: ‘uint32_t’ {aka ‘unsigned int’} and ‘int’ [-Wsign-compare]
   1453 |                         if (bit_end > cur_bitfield_end || pos->bit_size > cur_bitfield_size) {
        |

Since they can't be less than zero, just make then uint32_t.

Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
This commit is contained in:
Arnaldo Carvalho de Melo 2021-08-05 16:27:51 -03:00
parent 8634d8535f
commit 5900f43f10
1 changed files with 1 additions and 1 deletions

View File

@ -1391,7 +1391,7 @@ void class__find_holes(struct class *class)
struct class_member *pos, *last = NULL;
int cur_bitfield_end = ctype->size * 8, cur_bitfield_size = 0;
int bit_holes = 0, byte_holes = 0;
int bit_start, bit_end;
uint32_t bit_start, bit_end;
int last_seen_bit = 0;
bool in_bitfield = false;