* Re: [Qemu-trivial] [PATCH] configure: Enable extra compiler warnings [not found] <1377063869-16834-1-git-send-email-sw@weilnetz.de> @ 2013-09-03 18:28 ` Stefan Weil 2013-09-14 12:18 ` Michael Tokarev 0 siblings, 1 reply; 5+ messages in thread From: Stefan Weil @ 2013-09-03 18:28 UTC (permalink / raw) To: qemu-devel; +Cc: qemu-trivial 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. > > Regards, > Stefan > > configure | 14 +++++++++----- > 1 file changed, 9 insertions(+), 5 deletions(-) Ping? I'd appreciate getting this patch committed. Is it trivial enough for qemu-trivial? Stefan See also http://patchwork.ozlabs.org/patch/268687/ ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [Qemu-trivial] [PATCH] configure: Enable extra compiler warnings 2013-09-03 18:28 ` [Qemu-trivial] [PATCH] configure: Enable extra compiler warnings Stefan Weil @ 2013-09-14 12:18 ` Michael Tokarev 2013-09-14 15:30 ` Stefan Weil 0 siblings, 1 reply; 5+ messages in thread From: Michael Tokarev @ 2013-09-14 12:18 UTC (permalink / raw) To: Stefan Weil; +Cc: qemu-trivial, qemu-devel 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? 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 ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [Qemu-trivial] [PATCH] configure: Enable extra compiler warnings 2013-09-14 12:18 ` Michael Tokarev @ 2013-09-14 15:30 ` Stefan Weil 2013-09-14 17:38 ` Michael Tokarev 0 siblings, 1 reply; 5+ messages in thread From: Stefan Weil @ 2013-09-14 15:30 UTC (permalink / raw) To: Michael Tokarev; +Cc: qemu-trivial, qemu-devel 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 ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [Qemu-trivial] [PATCH] configure: Enable extra compiler warnings 2013-09-14 15:30 ` Stefan Weil @ 2013-09-14 17:38 ` Michael Tokarev 2013-09-14 17:46 ` Stefan Weil 0 siblings, 1 reply; 5+ messages in thread From: Michael Tokarev @ 2013-09-14 17:38 UTC (permalink / raw) To: Stefan Weil; +Cc: qemu-trivial, qemu-devel 14.09.2013 19:30, Stefan Weil wrote: > Am 14.09.2013 14:18, schrieb Michael Tokarev: [] >> 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. Please take a look at the resulting patch at http://git.corpit.ru/?p=qemu.git;a=shortlog;h=refs/heads/trivial-patches-next and see if this is the patch you want to be applied. I verified it compiles on FreeBSD 9.1, but I tried only minimal set of optional dependencies so things might still break, but I think we can fix it later. If it looks okay, I'll send a pull request today. Thanks, /mjt ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [Qemu-trivial] [PATCH] configure: Enable extra compiler warnings 2013-09-14 17:38 ` Michael Tokarev @ 2013-09-14 17:46 ` Stefan Weil 0 siblings, 0 replies; 5+ messages in thread From: Stefan Weil @ 2013-09-14 17:46 UTC (permalink / raw) To: Michael Tokarev; +Cc: qemu-trivial, qemu-devel Am 14.09.2013 19:38, schrieb Michael Tokarev: > 14.09.2013 19:30, Stefan Weil wrote: >> Am 14.09.2013 14:18, schrieb Michael Tokarev: > [] >>> 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. > > Please take a look at the resulting patch at > http://git.corpit.ru/?p=qemu.git;a=shortlog;h=refs/heads/trivial-patches-next > > and see if this is the patch you want to be applied. > > I verified it compiles on FreeBSD 9.1, but I tried only minimal set > of optional dependencies so things might still break, but I think > we can fix it later. > > If it looks okay, I'll send a pull request today. > > Thanks, > > /mjt It looks good, but I'd prefer my v2: http://patchwork.ozlabs.org/patch/274928/. It's nearly identical to your version, but sorts some options alphabetically. Thanks for your work. Stefan ^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2013-09-14 17:47 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <1377063869-16834-1-git-send-email-sw@weilnetz.de>
2013-09-03 18:28 ` [Qemu-trivial] [PATCH] configure: Enable extra compiler warnings Stefan Weil
2013-09-14 12:18 ` Michael Tokarev
2013-09-14 15:30 ` Stefan Weil
2013-09-14 17:38 ` Michael Tokarev
2013-09-14 17:46 ` Stefan Weil
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for NNTP newsgroup(s).