summaryrefslogtreecommitdiff
path: root/i386
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
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')
-rw-r--r--i386/i386at/kd.c8
-rw-r--r--i386/i386at/kd.h2
2 files changed, 5 insertions, 5 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;
diff --git a/i386/i386at/kd.h b/i386/i386at/kd.h
index 9909341..0907e23 100644
--- a/i386/i386at/kd.h
+++ b/i386/i386at/kd.h
@@ -731,7 +731,7 @@ extern int kdsetbell (int, int);
extern void kd_resend (void);
extern void kd_handle_ack (void);
extern int kd_kbd_magic (int);
-extern int kdstate2idx (int, boolean_t);
+extern unsigned int kdstate2idx (unsigned int, boolean_t);
extern void kd_parserest (u_char *);
extern int kdcnprobe(struct consdev *cp);
extern int kdcninit(struct consdev *cp);