summaryrefslogtreecommitdiff
path: root/i386/i386at/kd.c
diff options
context:
space:
mode:
authorSamuel Thibault <samuel.thibault@ens-lyon.org>2013-12-15 21:18:30 +0100
committerSamuel Thibault <samuel.thibault@ens-lyon.org>2013-12-15 21:18:30 +0100
commit442227ee5519f307e9f74030a9eeb7aa7983a4bc (patch)
tree11366e093fb0633b9e9d7cc9213558d9043e4408 /i386/i386at/kd.c
parentbb6646c299da3dde90b2e208ba0a7d5a71719a0c (diff)
Fix gcc signedness warning
Thanks Marin Ramesa and Richard Braun for investigating. * i386/i386at/kd.c (kdintr): Make `char_idx' and `max' unsigned. (kdstate2idx): Make function take and return unsigned ints for the state. * i386/i386at/kd.h (kdstate2idx): Likewise.
Diffstat (limited to 'i386/i386at/kd.c')
-rw-r--r--i386/i386at/kd.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/i386/i386at/kd.c b/i386/i386at/kd.c
index 33d1799..3c66cc5 100644
--- a/i386/i386at/kd.c
+++ b/i386/i386at/kd.c
@@ -727,7 +727,7 @@ int vec;
struct tty *tp;
unsigned char c;
unsigned char scancode;
- int char_idx;
+ unsigned int char_idx;
boolean_t up = FALSE; /* key-up event */
if (kd_pollc)
@@ -807,7 +807,7 @@ int vec;
set_kd_state(do_modifier(kd_state, c, up));
} else if (!up) {
/* regular key-down */
- int max; /* max index for char sequence */
+ unsigned int max; /* max index for char sequence */
max = char_idx + NUMOUTPUT;
char_idx++;
@@ -1028,9 +1028,9 @@ Scancode scancode;
* Return the value for the 2nd index into key_map that
* corresponds to the given state.
*/
-int
+unsigned int
kdstate2idx(state, extended)
-int state; /* bit vector, not a state index */
+unsigned int state; /* bit vector, not a state index */
boolean_t extended;
{
int state_idx = NORM_STATE;