[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PULL 7/7] hw/input/tsc210x: Fix building with no verbosity
From: |
Laurent Vivier |
Subject: |
[Qemu-devel] [PULL 7/7] hw/input/tsc210x: Fix building with no verbosity |
Date: |
Wed, 6 Feb 2019 16:28:07 +0100 |
From: Philippe Mathieu-Daudé <address@hidden>
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é <address@hidden>
Reviewed-by: Thomas Huth <address@hidden>
Reviewed-by: Stefano Garzarella <address@hidden>
Message-Id: <address@hidden>
Signed-off-by: Laurent Vivier <address@hidden>
---
hw/input/tsc210x.c | 18 ++++++------------
1 file changed, 6 insertions(+), 12 deletions(-)
diff --git a/hw/input/tsc210x.c b/hw/input/tsc210x.c
index ded0db9351..2eb3cb9518 100644
--- a/hw/input/tsc210x.c
+++ b/hw/input/tsc210x.c
@@ -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);
}
}
--
2.20.1
- [Qemu-devel] [PULL 0/7] Trivial patches patches, Laurent Vivier, 2019/02/06
- [Qemu-devel] [PULL 5/7] hw/unicore32/puv3: Drop useless inclusion of "hw/i386/pc.h", Laurent Vivier, 2019/02/06
- [Qemu-devel] [PULL 1/7] qemu-common.h: Update copyright string for 2019, Laurent Vivier, 2019/02/06
- [Qemu-devel] [PULL 2/7] target/moxie: Fix LGPL information in the file headers, Laurent Vivier, 2019/02/06
- [Qemu-devel] [PULL 3/7] configure: Avoid non-portable 'test -o/-a', Laurent Vivier, 2019/02/06
- [Qemu-devel] [PULL 6/7] hw/cpu/cluster: Mark the cpu-cluster device with user_creatable = false, Laurent Vivier, 2019/02/06
- [Qemu-devel] [PULL 7/7] hw/input/tsc210x: Fix building with no verbosity,
Laurent Vivier <=
- [Qemu-devel] [PULL 4/7] hw/sparc64/sun4u: Drop useless inclusion of "hw/i386/pc.h", Laurent Vivier, 2019/02/06
- Re: [Qemu-devel] [PULL 0/7] Trivial patches patches, Peter Maydell, 2019/02/07