diff options
author | Nikolay Borisov <nborisov@suse.com> | 2021-01-22 10:58:05 +0100 |
---|---|---|
committer | David Sterba <dsterba@suse.com> | 2021-02-08 22:58:55 +0100 |
commit | e9aa7c285d20a69ce1fb940ec846686780af9e56 (patch) | |
tree | d9f0085bfd90fb5edbc5f9417d2e7ff89e0c0bac /fs/btrfs/Makefile | |
parent | lib/zstd: convert constants to defines (diff) | |
download | linux-e9aa7c285d20a69ce1fb940ec846686780af9e56.tar.xz linux-e9aa7c285d20a69ce1fb940ec846686780af9e56.zip |
btrfs: enable W=1 checks for btrfs
Now that the btrfs' codebase is clean of almost all W=1 warnings let's
enable those checks unconditionally for the entire fs/btrfs/ and its
subdirectories to catch potential errors during development.
Signed-off-by: Nikolay Borisov <nborisov@suse.com>
Reviewed-by: David Sterba <dsterba@suse.com>
[ add some comments ]
Signed-off-by: David Sterba <dsterba@suse.com>
Diffstat (limited to 'fs/btrfs/Makefile')
-rw-r--r-- | fs/btrfs/Makefile | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/fs/btrfs/Makefile b/fs/btrfs/Makefile index 9f1b1a88e317..e45957319424 100644 --- a/fs/btrfs/Makefile +++ b/fs/btrfs/Makefile @@ -1,5 +1,21 @@ # SPDX-License-Identifier: GPL-2.0 +# Subset of W=1 warnings +subdir-ccflags-y += -Wextra -Wunused -Wno-unused-parameter +subdir-ccflags-y += -Wmissing-declarations +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 += $(call cc-option, -Wunused-but-set-variable) +subdir-ccflags-y += $(call cc-option, -Wunused-const-variable) +subdir-ccflags-y += $(call cc-option, -Wpacked-not-aligned) +subdir-ccflags-y += $(call cc-option, -Wstringop-truncation) +# The following turn off the warnings enabled by -Wextra +subdir-ccflags-y += -Wno-missing-field-initializers +subdir-ccflags-y += -Wno-sign-compare +subdir-ccflags-y += -Wno-type-limits + obj-$(CONFIG_BTRFS_FS) := btrfs.o btrfs-y += super.o ctree.o extent-tree.o print-tree.o root-tree.o dir-item.o \ |