]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
btrfs: turn on -Wmaybe-uninitialized
authorJosef Bacik <josef@toxicpanda.com>
Fri, 16 Dec 2022 20:15:58 +0000 (15:15 -0500)
committerDavid Sterba <dsterba@suse.com>
Mon, 13 Feb 2023 16:50:33 +0000 (17:50 +0100)
We had a recent bug that would have been caught by a newer compiler with
-Wmaybe-uninitialized and would have saved us a month of failing tests
that I didn't have time to investigate.

Reviewed-by: Qu Wenruo <wqu@suse.com>
Signed-off-by: Josef Bacik <josef@toxicpanda.com>
Reviewed-by: David Sterba <dsterba@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
fs/btrfs/Makefile

index 555c962fdad66b66da9ff9698041b65ddbc64d01..460eced3f5bd019581cd510b4697b59b12b30fa9 100644 (file)
@@ -11,7 +11,8 @@ 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