public inbox for linux-btrfs@vger.kernel.org
 help / color / mirror / Atom feed
From: David Sterba <dsterba@suse.cz>
To: dsterba@suse.cz, Josef Bacik <josef@toxicpanda.com>,
	linux-btrfs@vger.kernel.org, kernel-team@fb.com
Subject: Re: [PATCH 01/13] btrfs-progs: turn on more compiler warnings and use -Wall
Date: Tue, 8 Mar 2022 19:26:18 +0100	[thread overview]
Message-ID: <20220308182618.GU12643@twin.jikos.cz> (raw)
In-Reply-To: <20220308181503.GT12643@twin.jikos.cz>

On Tue, Mar 08, 2022 at 07:15:03PM +0100, David Sterba wrote:
> On Tue, Mar 08, 2022 at 05:51:26PM +0100, David Sterba wrote:
> > On Tue, Feb 22, 2022 at 05:26:11PM -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.
> > > 
> > > Signed-off-by: Josef Bacik <josef@toxicpanda.com>
> > > ---
> > >  Makefile | 3 +++
> > >  1 file changed, 3 insertions(+)
> > > 
> > > diff --git a/Makefile b/Makefile
> > > index af4908f9..e0921ca3 100644
> > > --- a/Makefile
> > > +++ b/Makefile
> > > @@ -93,6 +93,9 @@ CFLAGS = $(SUBST_CFLAGS) \
> > >  	 -D_XOPEN_SOURCE=700  \
> > >  	 -fno-strict-aliasing \
> > >  	 -fPIC \
> > > +	 -Wall \
> > > +	 -Wunused-but-set-parameter \
> > > +	 -Werror \
> > 
> > That's in the default flags and based on the recent experience in kernel
> > defaulting to Werror it creates more problems than not. The build is
> > clean enough that new warnings are quite obvious and get fixed right
> > away.
> > 
> > You can always use the EXTRA_CFLAG=-Werror when developing or you can
> > also set CFLAGS=-Werror at configure time, as they get stored in the
> > generated Makefile.inc into SUBST_CFLAGS.
> 
> And actually there's make parameter W=1 like in kernel, that enables
> more warnings though the W=1 build is not clean. I'd rather not clutter
> the default flags by random warnings at all as the build is supposed to
> work on various LTS distros and compilers so that would probably fail
> build.

Ok, so not theoretical, the musl and centos7 builds fail, so I'm
dropping the patch.

  reply	other threads:[~2022-03-08 18:30 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-02-22 22:26 [PATCH 00/13] btrfs-progs: cleanup btrfs_item* accessors Josef Bacik
2022-02-22 22:26 ` [PATCH 01/13] btrfs-progs: turn on more compiler warnings and use -Wall Josef Bacik
2022-03-08 16:51   ` David Sterba
2022-03-08 18:15     ` David Sterba
2022-03-08 18:26       ` David Sterba [this message]
2022-02-22 22:26 ` [PATCH 02/13] btrfs-progs: store LEAF_DATA_SIZE in the mkfs_config Josef Bacik
2022-02-22 22:26 ` [PATCH 03/13] btrfs-progs: store BTRFS_LEAF_DATA_SIZE in the fs_info Josef Bacik
2022-02-22 22:26 ` [PATCH 04/13] btrfs-progs: convert: use cfg->leaf_data_size Josef Bacik
2022-03-09 11:48   ` Nikolay Borisov
2022-03-09 14:18     ` David Sterba
2022-02-22 22:26 ` [PATCH 05/13] btrfs-progs: reduce usage of __BTRFS_LEAF_DATA_SIZE Josef Bacik
2022-02-22 22:26 ` [PATCH 06/13] btrfs-progs: btrfs_item_size_nr/btrfs_item_offset_nr everywhere Josef Bacik
2022-03-09 11:45   ` Nikolay Borisov
2022-03-09 12:27     ` Nikolay Borisov
2022-02-22 22:26 ` [PATCH 07/13] btrfs-progs: add btrfs_set_item_*_nr() helpers Josef Bacik
2022-02-22 22:26 ` [PATCH 08/13] btrfs-progs: change btrfs_file_extent_inline_item_len to take a slot Josef Bacik
2022-02-22 22:26 ` [PATCH 09/13] btrfs-progs: rename btrfs_item_end_nr to btrfs_item_end Josef Bacik
2022-02-22 22:26 ` [PATCH 10/13] btrfs-progs: remove the _nr from the item helpers Josef Bacik
2022-02-22 22:26 ` [PATCH 11/13] btrfs-progs: replace btrfs_item_nr_offset(0) Josef Bacik
2022-03-09 12:42   ` Nikolay Borisov
2022-02-22 22:26 ` [PATCH 12/13] btrfs-progs: rework the btrfs_node accessors to match the item accessors Josef Bacik
2022-02-22 22:26 ` [PATCH 13/13] btrfs-progs: make all of the item/key_ptr offset helpers take an eb Josef Bacik
2022-03-09 12:46 ` [PATCH 00/13] btrfs-progs: cleanup btrfs_item* accessors Nikolay Borisov

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=20220308182618.GU12643@twin.jikos.cz \
    --to=dsterba@suse.cz \
    --cc=josef@toxicpanda.com \
    --cc=kernel-team@fb.com \
    --cc=linux-btrfs@vger.kernel.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox