diff options
| author | Denis Vlasenko <vda.linux@googlemail.com> | 2008-09-28 16:44:28 +0000 |
|---|---|---|
| committer | Denis Vlasenko <vda.linux@googlemail.com> | 2008-09-28 16:44:28 +0000 |
| commit | 651d49a2ce5733672b676a02c5960b296cb4fb2d (patch) | |
| tree | a1c499cb5cef963096024629443b25d2269cbb3e /console-tools | |
| parent | 2b2d97705701f8a0c8a46313bad429582d906d81 (diff) | |
| download | busybox-w32-651d49a2ce5733672b676a02c5960b296cb4fb2d.tar.gz busybox-w32-651d49a2ce5733672b676a02c5960b296cb4fb2d.tar.bz2 busybox-w32-651d49a2ce5733672b676a02c5960b296cb4fb2d.zip | |
showkey: suppress gcc warning
Diffstat (limited to 'console-tools')
| -rw-r--r-- | console-tools/showkey.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/console-tools/showkey.c b/console-tools/showkey.c index ee9318084..681114df7 100644 --- a/console-tools/showkey.c +++ b/console-tools/showkey.c | |||
| @@ -50,7 +50,7 @@ static void signal_handler(int signo) | |||
| 50 | { | 50 | { |
| 51 | // restore keyboard and console settings | 51 | // restore keyboard and console settings |
| 52 | xset1(STDIN_FILENO, &tio0, "stdin"); | 52 | xset1(STDIN_FILENO, &tio0, "stdin"); |
| 53 | xioctl(STDIN_FILENO, KDSKBMODE, (void *)kbmode); | 53 | xioctl(STDIN_FILENO, KDSKBMODE, (void *)(ptrdiff_t)kbmode); |
| 54 | // alarmed? -> exit 0 | 54 | // alarmed? -> exit 0 |
| 55 | exit(SIGALRM == signo); | 55 | exit(SIGALRM == signo); |
| 56 | } | 56 | } |
| @@ -95,7 +95,7 @@ int showkey_main(int argc UNUSED_PARAM, char **argv) | |||
| 95 | // we should exit on any signal | 95 | // we should exit on any signal |
| 96 | bb_signals(BB_FATAL_SIGS, signal_handler); | 96 | bb_signals(BB_FATAL_SIGS, signal_handler); |
| 97 | // set raw keyboard mode | 97 | // set raw keyboard mode |
| 98 | xioctl(STDIN_FILENO, KDSKBMODE, (void *)((option_mask32 & OPT_k) ? K_MEDIUMRAW : K_RAW)); | 98 | xioctl(STDIN_FILENO, KDSKBMODE, (void *)(ptrdiff_t)((option_mask32 & OPT_k) ? K_MEDIUMRAW : K_RAW)); |
| 99 | 99 | ||
| 100 | // read and show scancodes | 100 | // read and show scancodes |
| 101 | while (1) { | 101 | while (1) { |
