Linux Btrfs filesystem development
 help / color / mirror / Atom feed
From: David Sterba <dsterba@suse.cz>
To: Marcos Paulo de Souza <marcos.souza.org@gmail.com>
Cc: dsterba@suse.com, linux-btrfs@vger.kernel.org,
	Marcos Paulo de Souza <mpdesouza@suse.com>
Subject: Re: [PATCH 0/2] btrfs-progs: Setting implicit-fallthrough by default
Date: Tue, 22 Oct 2019 14:41:05 +0200	[thread overview]
Message-ID: <20191022124105.GW3001@twin.jikos.cz> (raw)
In-Reply-To: <20191022020228.14117-1-marcos.souza.org@gmail.com>

On Mon, Oct 21, 2019 at 11:02:26PM -0300, Marcos Paulo de Souza wrote:
> From: Marcos Paulo de Souza <mpdesouza@suse.com>
> 
> While compiling btrfs-progs using clang I found an issue using
> __attribute__(fallthrough), which does not seems to work in clang.
> 
> To solve this issue, the code was changed to use /* fallthrough */, which is the
> same notation adopted by linux kernel.

I'd suggest to follow what kernel does, IIRC there's some whole-tree
cleanup of all the fall through statements with a unified conversion to
the right(tm) annotation.

> Once these places were changed, -Wimplicit-fallthrough was set in Makefile, to
> avoid further implicit-fallthrough cases being added in the future.

That would be good to add by default, but I'm a bit worried about the
differences between compilers and that we'd have to switch the
annotations again once the attribute support lands. Maybe that's not a
big deal.

  parent reply	other threads:[~2019-10-22 12:40 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-10-22  2:02 [PATCH 0/2] btrfs-progs: Setting implicit-fallthrough by default Marcos Paulo de Souza
2019-10-22  2:02 ` [PATCH 1/2] btrfs-progs: utils: Replace __attribute__(fallthrough) Marcos Paulo de Souza
2019-10-22  6:59   ` Nikolay Borisov
2019-10-22  7:01     ` Nikolay Borisov
2019-10-22 12:18       ` Marcos Paulo de Souza
2019-10-22  2:02 ` [PATCH 2/2] btrfs-progs: Makefile: Add -Wimplicit-fallthrough Marcos Paulo de Souza
2019-10-22 12:41 ` David Sterba [this message]
2019-10-22 12:45 ` [PATCH 0/2] btrfs-progs: Setting implicit-fallthrough by default Nikolay Borisov
2019-10-22 13:10   ` David Sterba

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=20191022124105.GW3001@twin.jikos.cz \
    --to=dsterba@suse.cz \
    --cc=dsterba@suse.com \
    --cc=linux-btrfs@vger.kernel.org \
    --cc=marcos.souza.org@gmail.com \
    --cc=mpdesouza@suse.com \
    /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