Commit 1ae14703e76de49e6116296f3b20925f491dbb16

Authored by Jesper Juhl
Committed by Michal Marek
1 parent 0ff35771fc

genksyms: Use same type in loop comparison

The ARRAY_SIZE macro in scripts/genksyms/genksyms.c returns a value of
type size_t. That value is being compared to a variable of type int in
a loop in read_node(). Change the int variable to size_t type as well,
so we don't do signed vs unsigned type comparisons with all the
potential promotion/sign extension trouble that can cause (also
silences compiler warnings at high levels of warnings).

Signed-off-by: Jesper Juhl <jj@chaosbits.net>
Signed-off-by: Michal Marek <mmarek@suse.cz>

Showing 1 changed file with 1 additions and 1 deletions Side-by-side Diff

scripts/genksyms/genksyms.c
... ... @@ -448,7 +448,7 @@
448 448 node.string = buffer;
449 449  
450 450 if (node.string[1] == '#') {
451   - int n;
  451 + size_t n;
452 452  
453 453 for (n = 0; n < ARRAY_SIZE(symbol_types); n++) {
454 454 if (node.string[0] == symbol_types[n].n) {