acpi-build: Fix compiler warning (missing gnu_printf format attribute)
commit867d898ccf50ef095b95c403d7dc809c188b14e2
authorStefan Weil <sw@weilnetz.de>
Sun, 17 Nov 2013 18:00:22 +0000 (17 19:00 +0100)
committerMichael Tokarev <mjt@tls.msk.ru>
Mon, 2 Dec 2013 17:02:57 +0000 (2 21:02 +0400)
tree4ca255a5805218b5f6299343193e4bebcf0b3303
parentb2e2395f1308f784acd2e0af0d6f2a6f5668aafb
acpi-build: Fix compiler warning (missing gnu_printf format attribute)

gcc 4.8.2 reports this warning when extra warnings are enabled (-Wextra):

  CC    m68k-softmmu/hw/m68k/mcf5206.o
hw/i386/acpi-build.c: In function ‘build_append_nameseg’:
hw/i386/acpi-build.c:294:5: error:
 function might be possible candidate for ‘gnu_printf’ format attribute [-Werror=suggest-attribute=format]
     g_string_vprintf(s, format, args);
     ^

When this warning is fixed, there is a new compiler warning:

  CC    i386-softmmu/hw/i386/acpi-build.o
hw/i386/acpi-build.c: In function ‘build_append_notify’:
hw/i386/acpi-build.c:632:5: error:
 format not a string literal and no format arguments [-Werror=format-security]
     build_append_nameseg(method, name);
     ^

This is fixed here, too.

Signed-off-by: Stefan Weil <sw@weilnetz.de>
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
hw/i386/acpi-build.c