diff options
author | Cyril Brulebois <kibi@debian.org> | 2011-05-24 18:33:18 +0200 |
---|---|---|
committer | Cyril Brulebois <kibi@debian.org> | 2011-06-16 00:44:43 +0200 |
commit | 4edf49d032028aa4b9887d02b926b0c372c4451d (patch) | |
tree | de8246e382c45011f51848fea515127b5a660a64 /hw/dmx | |
parent | 33dad2b74e3489c8a6b5fa574172d6cd2b6de037 (diff) |
dmx/examples: Fix missing key_click_percent assignment.
Thanks to gcc's -Wunused-but-set-variable, stop ignoring the percent
parameter, and add it to the XKeyboardControl structure before the
XChangeKeyboardControl call.
This warning goes away accordingly:
| CC xbell-xbell.o
| xbell.c: In function ‘main’:
| xbell.c:74:22: warning: variable ‘percent’ set but not used [-Wunused-but-set-variable]
Reviewed-by: Jeremy Huddleston <jeremyhu@apple.com>
Signed-off-by: Cyril Brulebois <kibi@debian.org>
Diffstat (limited to 'hw/dmx')
-rw-r--r-- | hw/dmx/examples/xbell.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/hw/dmx/examples/xbell.c b/hw/dmx/examples/xbell.c index f3e3be1b8..79419d324 100644 --- a/hw/dmx/examples/xbell.c +++ b/hw/dmx/examples/xbell.c @@ -71,7 +71,6 @@ int main(int argc, char **argv) XKeyboardControl kc; XKeyboardState ks; unsigned long vm; - int percent; if (argc != 5) { printf("Usage: xbell percent baseVolume pitch duration\n"); @@ -81,7 +80,7 @@ int main(int argc, char **argv) vm = (KBBellPercent | KBBellPitch | KBBellDuration); - percent = atoi(argv[1]); + kc.key_click_percent = atoi(argv[1]); kc.bell_percent = atoi(argv[2]); kc.bell_pitch = atoi(argv[3]); kc.bell_duration = atoi(argv[4]); |