diff options
author | Anthony Liguori <aliguori@amazon.com> | 2013-12-06 12:52:50 -0800 |
---|---|---|
committer | Anthony Liguori <aliguori@amazon.com> | 2013-12-06 12:52:50 -0800 |
commit | 783eb67e7a125eaf226e5ea4f5df97c1ea42311e (patch) | |
tree | 1c0ca834d9097a7f889385166d4eefc49a7de0af /hw/i386/acpi-build.c | |
parent | 7dc65c02fe3fb8f3146ce0b9ff5fec5945329f0e (diff) | |
parent | 6fedcaa1c5419fa89c31fd34dabbd71861c615d2 (diff) |
Merge remote-tracking branch 'mjt/trivial-patches' into staging
# By Stefan Weil (9) and others
# Via Michael Tokarev
* mjt/trivial-patches:
eeprom93xx: fix coding style
hw/ppc/mac.h: remove unused BIOS_FILENAME definition
Don't crash on keyboard input with no handler
libcacard/vcard_emul_nss: Remove unused statement (value stored is never read)
libcacard/cac: Remove unused statement (value stored is never read)
virtio-net: fix the indent
misc: Replace 'struct QEMUTimer' by 'QEMUTimer'
qobject: Fix compiler warning (missing gnu_printf format attribute)
acpi-build: Fix compiler warning (missing gnu_printf format attribute)
.gitignore: Ignore config.status
gtk: Replace conditional debug messages by trace methods
console: Replace conditional debug messages by trace methods
trace: Remove trace.h from hw/usb/hcd-ehci.h (less dependencies)
trace: Remove trace.h from console.h (less dependencies)
Message-id: 1385408466-13183-1-git-send-email-mjt@msgid.tls.msk.ru
Signed-off-by: Anthony Liguori <aliguori@amazon.com>
Diffstat (limited to 'hw/i386/acpi-build.c')
-rw-r--r-- | hw/i386/acpi-build.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/hw/i386/acpi-build.c b/hw/i386/acpi-build.c index 1f22fb60a4..befc39f253 100644 --- a/hw/i386/acpi-build.c +++ b/hw/i386/acpi-build.c @@ -285,7 +285,8 @@ static inline void build_append_array(GArray *array, GArray *val) g_array_append_vals(array, val->data, val->len); } -static void build_append_nameseg(GArray *array, const char *format, ...) +static void GCC_FMT_ATTR(2, 3) +build_append_nameseg(GArray *array, const char *format, ...) { /* It would be nicer to use g_string_vprintf but it's only there in 2.22 */ char s[] = "XXXX"; @@ -630,7 +631,7 @@ build_append_notify(GArray *device, const char *name, GArray *method = build_alloc_array(); uint8_t op = 0x14; /* MethodOp */ - build_append_nameseg(method, name); + build_append_nameseg(method, "%s", name); build_append_byte(method, 0x02); /* MethodFlags: ArgCount */ for (i = skip; i < count; i++) { GArray *target = build_alloc_array(); |