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>
This commit is contained in:
parent
33dad2b74e
commit
4edf49d032
@ -71,7 +71,6 @@ int main(int argc, char **argv)
|
|||||||
XKeyboardControl kc;
|
XKeyboardControl kc;
|
||||||
XKeyboardState ks;
|
XKeyboardState ks;
|
||||||
unsigned long vm;
|
unsigned long vm;
|
||||||
int percent;
|
|
||||||
|
|
||||||
if (argc != 5) {
|
if (argc != 5) {
|
||||||
printf("Usage: xbell percent baseVolume pitch duration\n");
|
printf("Usage: xbell percent baseVolume pitch duration\n");
|
||||||
@ -81,7 +80,7 @@ int main(int argc, char **argv)
|
|||||||
vm = (KBBellPercent
|
vm = (KBBellPercent
|
||||||
| KBBellPitch
|
| KBBellPitch
|
||||||
| KBBellDuration);
|
| KBBellDuration);
|
||||||
percent = atoi(argv[1]);
|
kc.key_click_percent = atoi(argv[1]);
|
||||||
kc.bell_percent = atoi(argv[2]);
|
kc.bell_percent = atoi(argv[2]);
|
||||||
kc.bell_pitch = atoi(argv[3]);
|
kc.bell_pitch = atoi(argv[3]);
|
||||||
kc.bell_duration = atoi(argv[4]);
|
kc.bell_duration = atoi(argv[4]);
|
||||||
|
Loading…
Reference in New Issue
Block a user