Message ID | ce81309292ac0b5d445e4d7e2b269fc3d0e85d32.1669242804.git.josef@toxicpanda.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | prep and initial sync of kernel code | expand |
On Wed, Nov 23, 2022 at 05:37:09PM -0500, Josef Bacik wrote: > In converting some of our helpers to take new args I would miss some > locations because we don't stop on any warning, and I would miss the > warning in the scrollback. Fix this by stopping compiling on any error > and turn on the fancy compiler checks. Werror depends on the compiler version and for example centos7 warns on { 0 } and this breaks the build. I think it could be more annoying than helpful. You can always use EXTRA_CFLAGS=-Werror if you're concerned about missing warnings but I'd rather not make it default. Perhaps it could be default once all reference builds are warning free.
On Thu, Nov 24, 2022 at 09:59:39PM +0100, David Sterba wrote: > On Wed, Nov 23, 2022 at 05:37:09PM -0500, Josef Bacik wrote: > > In converting some of our helpers to take new args I would miss some > > locations because we don't stop on any warning, and I would miss the > > warning in the scrollback. Fix this by stopping compiling on any error > > and turn on the fancy compiler checks. > > Werror depends on the compiler version and for example centos7 warns on > { 0 } and this breaks the build. I think it could be more annoying than > helpful. You can always use EXTRA_CFLAGS=-Werror if you're concerned > about missing warnings but I'd rather not make it default. Perhaps it > could be default once all reference builds are warning free. Ahh good point, that's fair. Thanks, Josef
diff --git a/Makefile b/Makefile index c74a2ea9..1777a22e 100644 --- a/Makefile +++ b/Makefile @@ -94,6 +94,9 @@ CFLAGS = $(SUBST_CFLAGS) \ -D_XOPEN_SOURCE=700 \ -fno-strict-aliasing \ -fPIC \ + -Wall \ + -Wunused-but-set-parameter \ + -Werror \ -I$(TOPDIR) \ $(CRYPTO_CFLAGS) \ -DCOMPRESSION_LZO=$(COMPRESSION_LZO) \
In converting some of our helpers to take new args I would miss some locations because we don't stop on any warning, and I would miss the warning in the scrollback. Fix this by stopping compiling on any error and turn on the fancy compiler checks. Signed-off-by: Josef Bacik <josef@toxicpanda.com> --- Makefile | 3 +++ 1 file changed, 3 insertions(+)