From: Stefan Weil <sw@weilnetz.de>
To: Michael Tokarev <mjt@tls.msk.ru>
Cc: qemu-trivial@nongnu.org, qemu-devel <qemu-devel@nongnu.org>,
Anthony Liguori <aliguori@amazon.com>
Subject: Re: [Qemu-trivial] [PATCH for 1.7] acpi-build: Fix compiler warning (missing gnu_printf format attribute)
Date: Sun, 17 Nov 2013 22:55:59 +0100 [thread overview]
Message-ID: <52893B6F.60300@weilnetz.de> (raw)
In-Reply-To: <528929B8.9010706@msgid.tls.msk.ru>
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
WARNING: multiple messages have this Message-ID (diff)
From: Stefan Weil <sw@weilnetz.de>
To: Michael Tokarev <mjt@tls.msk.ru>
Cc: qemu-trivial@nongnu.org, qemu-devel <qemu-devel@nongnu.org>,
Anthony Liguori <aliguori@amazon.com>
Subject: Re: [Qemu-devel] [Qemu-trivial] [PATCH for 1.7] acpi-build: Fix compiler warning (missing gnu_printf format attribute)
Date: Sun, 17 Nov 2013 22:55:59 +0100 [thread overview]
Message-ID: <52893B6F.60300@weilnetz.de> (raw)
In-Reply-To: <528929B8.9010706@msgid.tls.msk.ru>
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
next prev parent reply other threads:[~2013-11-17 21:56 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-11-17 18:00 [Qemu-trivial] [PATCH for 1.7] acpi-build: Fix compiler warning (missing gnu_printf format attribute) Stefan Weil
2013-11-17 18:00 ` [Qemu-devel] " Stefan Weil
2013-11-17 20:40 ` [Qemu-trivial] " Michael Tokarev
2013-11-17 20:40 ` [Qemu-devel] " Michael Tokarev
2013-11-17 21:55 ` Stefan Weil [this message]
2013-11-17 21:55 ` Stefan Weil
2013-11-20 11:53 ` Michael Tokarev
2013-11-20 11:53 ` [Qemu-devel] " Michael Tokarev
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=52893B6F.60300@weilnetz.de \
--to=sw@weilnetz.de \
--cc=aliguori@amazon.com \
--cc=mjt@tls.msk.ru \
--cc=qemu-devel@nongnu.org \
--cc=qemu-trivial@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.