17.11.2013 22:00, Stefan Weil wrote: > 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.
Thanks, applied to the trivial-patches queue. Note this patch also triggers checkpatch.pl error: > +static void GCC_FMT_ATTR(2, 3) > +build_append_nameseg(GArray *array, const char *format, ...) ^ ERROR: need consistent spacing around '*' (ctx:WxV) #40: FILE: hw/i386/acpi-build.c:289: It looks like checkpatch.pl needs some tweaking here, because the spacing here is really consistent, as far as I can see. /mjt