mirror of
https://github.com/izzy2lost/xemu.git
synced 2026-07-06 00:20:22 -07:00
hw/input/tsc210x: Fix building with no verbosity
When building with TSC_VERBOSE not defined, we get:
CC arm-softmmu/hw/input/tsc210x.o
hw/input/tsc210x.c: In function ‘tsc2102_data_register_write’:
hw/input/tsc210x.c:554:5: error: label at end of compound statement
default:
^~~~~~~
hw/input/tsc210x.c: In function ‘tsc2102_control_register_write’:
hw/input/tsc210x.c:638:5: error: label at end of compound statement
bad_reg:
^~~~~~~
hw/input/tsc210x.c: In function ‘tsc2102_audio_register_write’:
hw/input/tsc210x.c:766:5: error: label at end of compound statement
default:
^~~~~~~
make[1]: *** [rules.mak:69: hw/input/tsc210x.o] Error 1
Fix this by replacing the culprit fprintf(stderr) calls by a more
recent API: qemu_log_mask(LOG_GUEST_ERROR). Other fprintf() calls
are left untouched.
Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Reviewed-by: Thomas Huth <thuth@redhat.com>
Reviewed-by: Stefano Garzarella <sgarzare@redhat.com>
Message-Id: <20190204204517.23698-1-philmd@redhat.com>
Signed-off-by: Laurent Vivier <laurent@vivier.eu>
This commit is contained in:
committed by
Laurent Vivier
parent
dab864dc76
commit
e67e91b4b5
+6
-12
@@ -552,10 +552,8 @@ static void tsc2102_data_register_write(
|
||||
return;
|
||||
|
||||
default:
|
||||
#ifdef TSC_VERBOSE
|
||||
fprintf(stderr, "tsc2102_data_register_write: "
|
||||
"no such register: 0x%02x\n", reg);
|
||||
#endif
|
||||
qemu_log_mask(LOG_GUEST_ERROR, "tsc2102_data_register_write: "
|
||||
"no such register: 0x%02x\n", reg);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -636,10 +634,8 @@ static void tsc2102_control_register_write(
|
||||
|
||||
default:
|
||||
bad_reg:
|
||||
#ifdef TSC_VERBOSE
|
||||
fprintf(stderr, "tsc2102_control_register_write: "
|
||||
"no such register: 0x%02x\n", reg);
|
||||
#endif
|
||||
qemu_log_mask(LOG_GUEST_ERROR, "tsc2102_control_register_write: "
|
||||
"no such register: 0x%02x\n", reg);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -764,10 +760,8 @@ static void tsc2102_audio_register_write(
|
||||
return;
|
||||
|
||||
default:
|
||||
#ifdef TSC_VERBOSE
|
||||
fprintf(stderr, "tsc2102_audio_register_write: "
|
||||
"no such register: 0x%02x\n", reg);
|
||||
#endif
|
||||
qemu_log_mask(LOG_GUEST_ERROR, "tsc2102_audio_register_write: "
|
||||
"no such register: 0x%02x\n", reg);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user