bsps/i386/pc386/console/keyboard.c: Address type-limits warnings

These changes were made to address GCC -Wtype-limits warnings.
In this case, the array index was an unsigned char and the array
being indexed had 256 entries. There was no way for the index to
be an invalid index.
This commit is contained in:
Joel Sherrill
2025-11-24 17:31:34 -06:00
committed by Gedare Bloom
parent 1b440d2807
commit 0da06c2818

View File

@@ -577,11 +577,11 @@ static void do_fn(unsigned char value, char up_flag)
if (up_flag) if (up_flag)
return; return;
if (value < SIZE(func_table)) { /*
* No need to range check value because the array has 256 entries.
*/
if (func_table[value]) if (func_table[value])
puts_queue(func_table[value]); puts_queue(func_table[value]);
} else
printk( "do_fn called with value=%d\n", value);
} }
static void do_pad(unsigned char value, char up_flag) static void do_pad(unsigned char value, char up_flag)