All of lore.kernel.org
 help / color / mirror / Atom feed
From: Stefan Weil <sw@weilnetz.de>
To: Michael Tokarev <mjt@tls.msk.ru>
Cc: qemu-trivial <qemu-trivial@nongnu.org>,
	qemu-devel <qemu-devel@nongnu.org>
Subject: Re: [Qemu-trivial] [PATCH] configure: Enable extra compiler warnings
Date: Sat, 14 Sep 2013 17:30:53 +0200	[thread overview]
Message-ID: <5234812D.8080905@weilnetz.de> (raw)
In-Reply-To: <5234542D.2020400@msgid.tls.msk.ru>

Am 14.09.2013 14:18, schrieb Michael Tokarev:
> 03.09.2013 22:28, Stefan Weil wrote:
>> Am 21.08.2013 07:44, schrieb Stefan Weil:
>>> Compiler option -Wextra enables an additional set of compiler warnings.
>>>
>>> Some of these warnings were already enabled explicitly in QEMU:
>>> -Wold-style-declaration, -Wtype-limits, -Wignored-qualifiers and
>>> -Wempty-body are now redundant and can be removed.
>>>
>>> Others don't work with the current code and must be disabled to
>>> avoid warnings: -Wno-missing-field-initializers, -Wno-override-init,
>>> -Wno-sign-compare and -Wno-unused-parameter.
>>>
>>> Signed-off-by: Stefan Weil <sw@weilnetz.de>
>>> ---
>>> This is a rather old and long tested patch: I use -Wextra in my
>>> QEMU builds for more than a year now. At least one bug was found
>>> by using this warning level (see commit
>>> b22dd1243f38286263d40496ce5298a8a7d96eea).
>>>
>>> My tests include Linux and Windows hosts (gcc), but not BSD based
>>> hosts,
>>> so maybe those hosts might need additional code fixes.
>>> clang reports lots of -Wunused-value warnings.
> []
>> Ping? I'd appreciate getting this patch committed.
>> Is it trivial enough for qemu-trivial?
>>
>> Stefan
>>
>> See also http://patchwork.ozlabs.org/patch/268687/
>
> Well.  I see at least one hidden flag here which is not covered by the
> description:
>
> -gcc_flags="-Wendif-labels $gcc_flags"
> +gcc_flags="-fstack-protector-all -Wendif-labels $gcc_flags"
>
> Is it intentional?

No, -fstack-protector-all should not be there. It might be a relict of
a previous patch rebase: I added -Wextra in my local branch a long
time ago, and -fstack-protector-all was obviously moved to another
location in configure during that time.

I can send an updated patch later, or you can just remove it from
my original patch.


>
> As for the rest, I think it may go to -trivial just fine.  The patch
> does not apply to current git, but is easy to fix.
>
> I'll fire a FreeBSD compile test with it applied.
>
> Thanks,
>
> /mjt



WARNING: multiple messages have this Message-ID (diff)
From: Stefan Weil <sw@weilnetz.de>
To: Michael Tokarev <mjt@tls.msk.ru>
Cc: qemu-trivial <qemu-trivial@nongnu.org>,
	qemu-devel <qemu-devel@nongnu.org>
Subject: Re: [Qemu-devel] [Qemu-trivial] [PATCH] configure: Enable extra compiler warnings
Date: Sat, 14 Sep 2013 17:30:53 +0200	[thread overview]
Message-ID: <5234812D.8080905@weilnetz.de> (raw)
In-Reply-To: <5234542D.2020400@msgid.tls.msk.ru>

Am 14.09.2013 14:18, schrieb Michael Tokarev:
> 03.09.2013 22:28, Stefan Weil wrote:
>> Am 21.08.2013 07:44, schrieb Stefan Weil:
>>> Compiler option -Wextra enables an additional set of compiler warnings.
>>>
>>> Some of these warnings were already enabled explicitly in QEMU:
>>> -Wold-style-declaration, -Wtype-limits, -Wignored-qualifiers and
>>> -Wempty-body are now redundant and can be removed.
>>>
>>> Others don't work with the current code and must be disabled to
>>> avoid warnings: -Wno-missing-field-initializers, -Wno-override-init,
>>> -Wno-sign-compare and -Wno-unused-parameter.
>>>
>>> Signed-off-by: Stefan Weil <sw@weilnetz.de>
>>> ---
>>> This is a rather old and long tested patch: I use -Wextra in my
>>> QEMU builds for more than a year now. At least one bug was found
>>> by using this warning level (see commit
>>> b22dd1243f38286263d40496ce5298a8a7d96eea).
>>>
>>> My tests include Linux and Windows hosts (gcc), but not BSD based
>>> hosts,
>>> so maybe those hosts might need additional code fixes.
>>> clang reports lots of -Wunused-value warnings.
> []
>> Ping? I'd appreciate getting this patch committed.
>> Is it trivial enough for qemu-trivial?
>>
>> Stefan
>>
>> See also http://patchwork.ozlabs.org/patch/268687/
>
> Well.  I see at least one hidden flag here which is not covered by the
> description:
>
> -gcc_flags="-Wendif-labels $gcc_flags"
> +gcc_flags="-fstack-protector-all -Wendif-labels $gcc_flags"
>
> Is it intentional?

No, -fstack-protector-all should not be there. It might be a relict of
a previous patch rebase: I added -Wextra in my local branch a long
time ago, and -fstack-protector-all was obviously moved to another
location in configure during that time.

I can send an updated patch later, or you can just remove it from
my original patch.


>
> As for the rest, I think it may go to -trivial just fine.  The patch
> does not apply to current git, but is easy to fix.
>
> I'll fire a FreeBSD compile test with it applied.
>
> Thanks,
>
> /mjt

  reply	other threads:[~2013-09-14 15:31 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-08-21  5:44 [Qemu-devel] [PATCH] configure: Enable extra compiler warnings Stefan Weil
2013-09-03 18:28 ` [Qemu-trivial] " Stefan Weil
2013-09-03 18:28   ` [Qemu-devel] " Stefan Weil
2013-09-14 12:18   ` [Qemu-trivial] " Michael Tokarev
2013-09-14 12:18     ` [Qemu-devel] " Michael Tokarev
2013-09-14 15:30     ` Stefan Weil [this message]
2013-09-14 15:30       ` Stefan Weil
2013-09-14 17:38       ` Michael Tokarev
2013-09-14 17:38         ` [Qemu-devel] " Michael Tokarev
2013-09-14 17:46         ` Stefan Weil
2013-09-14 17:46           ` [Qemu-devel] " Stefan Weil

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=5234812D.8080905@weilnetz.de \
    --to=sw@weilnetz.de \
    --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.