[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20221230175507.1630431-1-trix@redhat.com>
Date: Fri, 30 Dec 2022 12:55:07 -0500
From: Tom Rix <trix@...hat.com>
To: clm@...com, josef@...icpanda.com, dsterba@...e.com,
nathan@...nel.org, ndesaulniers@...gle.com, wqu@...e.com
Cc: linux-btrfs@...r.kernel.org, linux-kernel@...r.kernel.org,
llvm@...ts.linux.dev, Tom Rix <trix@...hat.com>
Subject: [PATCH] btrfs: handle -Wmaybe-uninitialized with clang
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@...hat.com>
---
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
Powered by blists - more mailing lists