]> xenbits.xensource.com Git - qemu-xen.git/commitdiff
acpi: Add missing GCC_FMT_ATTR to local function
authorStefan Weil <sw@weilnetz.de>
Fri, 20 Mar 2015 17:11:58 +0000 (18:11 +0100)
committerMichael S. Tsirkin <mst@redhat.com>
Wed, 25 Mar 2015 12:39:24 +0000 (13:39 +0100)
This fixes these gcc warnings (not enabled in default build):

hw/acpi/aml-build.c:83:5: warning:
 function might be possible candidate for ‘gnu_printf’ format attribute [-Wsuggest-attribute=format]
hw/acpi/aml-build.c:88:5: warning:
 function might be possible candidate for ‘gnu_printf’ format attribute [-Wsuggest-attribute=format]

Cc: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Stefan Weil <sw@weilnetz.de>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
hw/acpi/aml-build.c

index 6242908d6cd8d7228be8f797b0b45f22155b79f2..d7945f6e2dae26edd7968ad5e3a713afe3214ce6 100644 (file)
@@ -68,7 +68,7 @@ build_append_nameseg(GArray *array, const char *seg)
     g_array_append_vals(array, "____", ACPI_NAMESEG_LEN - len);
 }
 
-static void
+static void GCC_FMT_ATTR(2, 0)
 build_append_namestringv(GArray *array, const char *format, va_list ap)
 {
     /* It would be nicer to use g_string_vprintf but it's only there in 2.22 */