mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Nathan Chancellor <nathan@kernel.org>
To: Tom Rix <trix@redhat.com>
Cc: clm@fb.com, josef@toxicpanda.com, dsterba@suse.com,
	ndesaulniers@google.com, wqu@suse.com,
	linux-btrfs@vger.kernel.org, linux-kernel@vger.kernel.org,
	llvm@lists.linux.dev
Subject: Re: [PATCH] btrfs: handle -Wmaybe-uninitialized with clang
Date: Fri, 30 Dec 2022 11:02:49 -0700	[thread overview]
Message-ID: <Y68nyfHNXieotO+C@dev-arch.thelio-3990X> (raw)
In-Reply-To: <20221230175507.1630431-1-trix@redhat.com>

On Fri, Dec 30, 2022 at 12:55:07PM -0500, Tom Rix wrote:
> The clang build reports this error
> error: unknown warning option '-Wmaybe-uninitialized'; did you mean '-Wuninitialized'? [-Werror,-Wunknown-warning-option]
> make[3]: *** [scripts/Makefile.build:252: fs/btrfs/super.o] Error 1
> 
> -Wmaybe-uninitialized is a gcc only flag.  Move to setting with cc-option.
> 
> Fixes: 1b19c4c249a1 ("btrfs: turn on -Wmaybe-uninitialized")
> Signed-off-by: Tom Rix <trix@redhat.com>

Thanks for the patch! Looks like I forgot to double back to this...

https://lore.kernel.org/Y6kgR4qnb23UdAEX@dev-arch.thelio-3990X/

Reviewed-by: Nathan Chancellor <nathan@kernel.org>

> ---
>  fs/btrfs/Makefile | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/fs/btrfs/Makefile b/fs/btrfs/Makefile
> index eca995abccdf..460eced3f5bd 100644
> --- a/fs/btrfs/Makefile
> +++ b/fs/btrfs/Makefile
> @@ -7,12 +7,12 @@ subdir-ccflags-y += -Wmissing-format-attribute
>  subdir-ccflags-y += -Wmissing-prototypes
>  subdir-ccflags-y += -Wold-style-definition
>  subdir-ccflags-y += -Wmissing-include-dirs
> -subdir-ccflags-y += -Wmaybe-uninitialized
>  condflags := \
>  	$(call cc-option, -Wunused-but-set-variable)		\
>  	$(call cc-option, -Wunused-const-variable)		\
>  	$(call cc-option, -Wpacked-not-aligned)			\
> -	$(call cc-option, -Wstringop-truncation)
> +	$(call cc-option, -Wstringop-truncation)		\
> +	$(call cc-option, -Wmaybe-uninitialized)
>  subdir-ccflags-y += $(condflags)
>  # The following turn off the warnings enabled by -Wextra
>  subdir-ccflags-y += -Wno-missing-field-initializers
> -- 
> 2.27.0
> 

  reply	other threads:[~2022-12-30 18:02 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-12-30 17:55 Tom Rix
2022-12-30 18:02 ` Nathan Chancellor [this message]
2023-01-02 12:05 ` 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=Y68nyfHNXieotO+C@dev-arch.thelio-3990X \
    --to=nathan@kernel.org \
    --cc=clm@fb.com \
    --cc=dsterba@suse.com \
    --cc=josef@toxicpanda.com \
    --cc=linux-btrfs@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=llvm@lists.linux.dev \
    --cc=ndesaulniers@google.com \
    --cc=trix@redhat.com \
    --cc=wqu@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

all inboxes | Powered by JetHome®