summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorH. Peter Anvin <hpa@zytor.com>2008-09-08 18:03:45 -0700
committerH. Peter Anvin <hpa@zytor.com>2008-09-08 18:03:45 -0700
commit5c24b8307f49da675684485e1e24ac5689017e1a (patch)
tree5004811cee34f445bb1ec5eb72bbbe1ea2f031e2
parentcbfc2a2cd23669da06604821d8b211528c3ae913 (diff)
downloadsyslinux-5c24b8307f49da675684485e1e24ac5689017e1a.tar.gz
menu: quiet warnings in drain_keyboard()syslinux-3.72-pre5
Quiet warnings in drain_keyboard(). We need some volatiles in order to keep gcc from optimizing some of the clearings away, but cast them away where appropriate. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
-rw-r--r--com32/menu/drain.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/com32/menu/drain.c b/com32/menu/drain.c
index 83ebbdc3..428d9709 100644
--- a/com32/menu/drain.c
+++ b/com32/menu/drain.c
@@ -11,7 +11,7 @@ void drain_keyboard(void)
int rv;
do {
- rv = read(0, &junk, 1);
+ rv = read(0, (char *)&junk, 1);
} while (rv > 0);
junk = 0;
@@ -20,7 +20,7 @@ void drain_keyboard(void)
*(volatile uint8_t *)0x419 = 0; /* Alt-XXX keyboard area */
*(volatile uint16_t *)0x41a = 0x1e; /* Keyboard buffer empty */
*(volatile uint16_t *)0x41c = 0x1e;
- memset((volatile void *)0x41e, 0, 32); /* Clear the actual keyboard buffer */
+ memset((void *)0x41e, 0, 32); /* Clear the actual keyboard buffer */
sti();
}