Skip to content

Commit 48d9b57

Browse files
fs/ntfs3: add a subset of W=1 warnings for stricter checks
Enable a subset of W=1-style compiler warnings for the ntfs3 tree so we catch small bugs early (unused symbols, missing declarations/prototypes, possible uninitialized/mis-sized uses, etc). Signed-off-by: Konstantin Komarov <almaz.alexandrovich@paragon-software.com>
1 parent e8619bc commit 48d9b57

1 file changed

Lines changed: 20 additions & 0 deletions

File tree

fs/ntfs3/Makefile

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,26 @@
33
# Makefile for the ntfs3 filesystem support.
44
#
55

6+
# Subset of W=1 warnings
7+
subdir-ccflags-y += -Wextra -Wunused -Wno-unused-parameter
8+
subdir-ccflags-y += -Wmissing-declarations
9+
subdir-ccflags-y += -Wmissing-format-attribute
10+
subdir-ccflags-y += -Wmissing-prototypes
11+
subdir-ccflags-y += -Wold-style-definition
12+
subdir-ccflags-y += -Wmissing-include-dirs
13+
condflags := \
14+
$(call cc-option, -Wunused-but-set-variable) \
15+
$(call cc-option, -Wunused-const-variable) \
16+
$(call cc-option, -Wpacked-not-aligned) \
17+
$(call cc-option, -Wstringop-truncation) \
18+
$(call cc-option, -Wmaybe-uninitialized)
19+
subdir-ccflags-y += $(condflags)
20+
# The following turn off the warnings enabled by -Wextra
21+
subdir-ccflags-y += -Wno-missing-field-initializers
22+
subdir-ccflags-y += -Wno-sign-compare
23+
subdir-ccflags-y += -Wno-type-limits
24+
subdir-ccflags-y += -Wno-shift-negative-value
25+
626
# to check robot warnings
727
ccflags-y += -Wint-to-pointer-cast \
828
$(call cc-option,-Wunused-but-set-variable,-Wunused-const-variable) \

0 commit comments

Comments
 (0)