Am 17.11.2013 21:40, schrieb Michael Tokarev:
> 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);
>>      ^
> Why are you sending for-1.7 patches which fixes issues which are not
> present in 1.7?  As far as I can see, -Wextra isn't enabled in 1.7, is it?
>
> Thanks,
>
> /mjt

We try to use format attributes for all functions with printf like
arguments.

Patch http://patchwork.ozlabs.org/patch/291873/ shows that the format
attribute
not only fixes a compiler warning (which is not shown with the default
settings)
but also uncovers real programming errors.

I use quite a lot of build environments (32 and 64 bit, Linux and
Windows cross builds)
but there still remain more which I don't cover. With the additional
format attributes
any code either is okay and compiles without warning, or it uses a wrong
format string,
so my patches will break only builds which compile broken code.

I think this kind of build breakage is good and important.

Regards,
Stefan


Reply via email to