mirror of
https://gitlab.rtems.org/rtems/rtos/rtems.git
synced 2026-02-04 12:41:34 +00:00
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:
committed by
Gedare Bloom
parent
1b440d2807
commit
0da06c2818
@@ -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)
|
||||||
|
|||||||
Reference in New Issue
Block a user