[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-trivial] [PATCH] configure: Enable extra compiler warnings

From: Stefan Weil
Subject: Re: [Qemu-trivial] [PATCH] configure: Enable extra compiler warnings
Date: Sat, 14 Sep 2013 17:30:53 +0200
User-agent: Mozilla/5.0 (X11; Linux i686; rv:17.0) Gecko/20130803 Thunderbird/17.0.8

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 <address@hidden>
>>> ---
>>> 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 via email to

[Prev in Thread] Current Thread [Next in Thread]