* [PATCH 0/2] btrfs-progs: simple cleanup related to LLVM (not LLM) @ 2026-10-27 8:35 Qu Wenruo 2026-10-27 8:35 ` [PATCH 1/2] btrfs-progs: remove set but unused variables Qu Wenruo 2026-10-27 8:35 ` [PATCH 2/2] btrfs-progs: gitignore: add GNUmakefile Qu Wenruo 0 siblings, 2 replies; 6+ messages in thread From: Qu Wenruo @ 2026-10-27 8:35 UTC (permalink / raw) To: linux-btrfs When using LLVM to compile btrfs-progs, two unused global variables are exposed. Fix them. Secondly recently I move to use `GNUmakefile` to customize the make behavior, e.g. add "-j12" make flags, without modifying the existing Makefile. Also add GNUmakefile to gitignore. Qu Wenruo (2): btrfs-progs: remove set but unused variables btrfs-progs: gitignore: add GNUmakefile GNUmakefile | 2 ++ cmds/inspect-tree-stats.c | 3 --- cmds/rescue-fix-data-checksum.c | 2 -- 3 files changed, 2 insertions(+), 5 deletions(-) create mode 100644 GNUmakefile -- 2.56.0 ^ permalink raw reply [flat|nested] 6+ messages in thread
* [PATCH 1/2] btrfs-progs: remove set but unused variables 2026-10-27 8:35 [PATCH 0/2] btrfs-progs: simple cleanup related to LLVM (not LLM) Qu Wenruo @ 2026-10-27 8:35 ` Qu Wenruo 2026-10-27 9:18 ` Daniel Vacek 2026-10-27 8:35 ` [PATCH 2/2] btrfs-progs: gitignore: add GNUmakefile Qu Wenruo 1 sibling, 1 reply; 6+ messages in thread From: Qu Wenruo @ 2026-10-27 8:35 UTC (permalink / raw) To: linux-btrfs If using clang to compile btrfs-progs, two warnings will be reported: cmds/rescue-fix-data-checksum.c:73:12: warning: variable 'global_repair_mode' set but not used [-Wunused-but-set-global] 73 | static int global_repair_mode; | ^ 1 warning generated. cmds/inspect-tree-stats.c:43:12: warning: variable 'verbose' set but not used [-Wunused-but-set-global] 43 | static int verbose = 0; | ^ 1 warning generated. Both are correct reports, so just remove them. Signed-off-by: Qu Wenruo <wqu@suse.com> --- cmds/inspect-tree-stats.c | 3 --- cmds/rescue-fix-data-checksum.c | 2 -- 2 files changed, 5 deletions(-) diff --git a/cmds/inspect-tree-stats.c b/cmds/inspect-tree-stats.c index c6907bb0cd78..b45416fd16b7 100644 --- a/cmds/inspect-tree-stats.c +++ b/cmds/inspect-tree-stats.c @@ -40,8 +40,6 @@ #include "common/units.h" #include "cmds/commands.h" -static int verbose = 0; - struct seek { u64 distance; u64 count; @@ -462,7 +460,6 @@ static int cmd_inspect_tree_stats(const struct cmd_struct *cmd, while ((opt = getopt(argc, argv, "vbt:")) != -1) { switch (opt) { case 'v': - verbose++; break; case 'b': unit_mode = UNITS_RAW; diff --git a/cmds/rescue-fix-data-checksum.c b/cmds/rescue-fix-data-checksum.c index 3925d5170627..121fb0b46ca8 100644 --- a/cmds/rescue-fix-data-checksum.c +++ b/cmds/rescue-fix-data-checksum.c @@ -70,7 +70,6 @@ static const struct fix_data_checksum_action { }, }; -static int global_repair_mode; LIST_HEAD(corrupted_blocks); static int add_corrupted_block(struct btrfs_fs_info *fs_info, u64 logical, @@ -486,7 +485,6 @@ int btrfs_recover_fix_data_checksum(const char *path, enum btrfs_fix_data_checks return -EBUSY; } - global_repair_mode = mode; oca.filename = path; oca.flags = OPEN_CTREE_WRITES; fs_info = open_ctree_fs_info(&oca); -- 2.56.0 ^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [PATCH 1/2] btrfs-progs: remove set but unused variables 2026-10-27 8:35 ` [PATCH 1/2] btrfs-progs: remove set but unused variables Qu Wenruo @ 2026-10-27 9:18 ` Daniel Vacek 0 siblings, 0 replies; 6+ messages in thread From: Daniel Vacek @ 2026-10-27 9:18 UTC (permalink / raw) To: Qu Wenruo; +Cc: linux-btrfs On Tue, 27 Oct 2026 at 09:36, Qu Wenruo <wqu@suse.com> wrote: > If using clang to compile btrfs-progs, two warnings will be reported: > > cmds/rescue-fix-data-checksum.c:73:12: warning: variable 'global_repair_mode' set but not used [-Wunused-but-set-global] > 73 | static int global_repair_mode; > | ^ > 1 warning generated. > cmds/inspect-tree-stats.c:43:12: warning: variable 'verbose' set but not used [-Wunused-but-set-global] > 43 | static int verbose = 0; > | ^ > 1 warning generated. > > Both are correct reports, so just remove them. > > Signed-off-by: Qu Wenruo <wqu@suse.com> LGTM. Reviewed-by: Daniel Vacek <neelx@suse.com> Thanks > --- > cmds/inspect-tree-stats.c | 3 --- > cmds/rescue-fix-data-checksum.c | 2 -- > 2 files changed, 5 deletions(-) > > diff --git a/cmds/inspect-tree-stats.c b/cmds/inspect-tree-stats.c > index c6907bb0cd78..b45416fd16b7 100644 > --- a/cmds/inspect-tree-stats.c > +++ b/cmds/inspect-tree-stats.c > @@ -40,8 +40,6 @@ > #include "common/units.h" > #include "cmds/commands.h" > > -static int verbose = 0; > - > struct seek { > u64 distance; > u64 count; > @@ -462,7 +460,6 @@ static int cmd_inspect_tree_stats(const struct cmd_struct *cmd, > while ((opt = getopt(argc, argv, "vbt:")) != -1) { > switch (opt) { > case 'v': > - verbose++; > break; > case 'b': > unit_mode = UNITS_RAW; > diff --git a/cmds/rescue-fix-data-checksum.c b/cmds/rescue-fix-data-checksum.c > index 3925d5170627..121fb0b46ca8 100644 > --- a/cmds/rescue-fix-data-checksum.c > +++ b/cmds/rescue-fix-data-checksum.c > @@ -70,7 +70,6 @@ static const struct fix_data_checksum_action { > }, > }; > > -static int global_repair_mode; > LIST_HEAD(corrupted_blocks); > > static int add_corrupted_block(struct btrfs_fs_info *fs_info, u64 logical, > @@ -486,7 +485,6 @@ int btrfs_recover_fix_data_checksum(const char *path, enum btrfs_fix_data_checks > return -EBUSY; > } > > - global_repair_mode = mode; > oca.filename = path; > oca.flags = OPEN_CTREE_WRITES; > fs_info = open_ctree_fs_info(&oca); > -- > 2.56.0 > > ^ permalink raw reply [flat|nested] 6+ messages in thread
* [PATCH 2/2] btrfs-progs: gitignore: add GNUmakefile 2026-10-27 8:35 [PATCH 0/2] btrfs-progs: simple cleanup related to LLVM (not LLM) Qu Wenruo 2026-10-27 8:35 ` [PATCH 1/2] btrfs-progs: remove set but unused variables Qu Wenruo @ 2026-10-27 8:35 ` Qu Wenruo 2026-10-27 9:16 ` Daniel Vacek 1 sibling, 1 reply; 6+ messages in thread From: Qu Wenruo @ 2026-10-27 8:35 UTC (permalink / raw) To: linux-btrfs I use GNUmakefile to add extra compiling flags without modifying the existing Makefile: MAKEFLAGS += -j12 include Makefile So the GNUmakefile is more or less reflecting personal tastes, better to add it to gitignore. Signed-off-by: Qu Wenruo <wqu@suse.com> --- GNUmakefile | 2 ++ 1 file changed, 2 insertions(+) create mode 100644 GNUmakefile diff --git a/GNUmakefile b/GNUmakefile new file mode 100644 index 000000000000..e0eaca65651c --- /dev/null +++ b/GNUmakefile @@ -0,0 +1,2 @@ +MAKEFLAGS += -j12 +include Makefile -- 2.56.0 ^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [PATCH 2/2] btrfs-progs: gitignore: add GNUmakefile 2026-10-27 8:35 ` [PATCH 2/2] btrfs-progs: gitignore: add GNUmakefile Qu Wenruo @ 2026-10-27 9:16 ` Daniel Vacek 2026-10-27 9:29 ` Qu Wenruo 0 siblings, 1 reply; 6+ messages in thread From: Daniel Vacek @ 2026-10-27 9:16 UTC (permalink / raw) To: Qu Wenruo; +Cc: linux-btrfs On Tue, 27 Oct 2026 at 09:36, Qu Wenruo <wqu@suse.com> wrote: > I use GNUmakefile to add extra compiling flags without modifying the > existing Makefile: > > MAKEFLAGS += -j12 > include Makefile > > So the GNUmakefile is more or less reflecting personal tastes, better to > add it to gitignore. So better to add it to gitignore I guess ;-) --nX > Signed-off-by: Qu Wenruo <wqu@suse.com> > --- > GNUmakefile | 2 ++ > 1 file changed, 2 insertions(+) > create mode 100644 GNUmakefile > > diff --git a/GNUmakefile b/GNUmakefile > new file mode 100644 > index 000000000000..e0eaca65651c > --- /dev/null > +++ b/GNUmakefile > @@ -0,0 +1,2 @@ > +MAKEFLAGS += -j12 > +include Makefile > -- > 2.56.0 > > ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH 2/2] btrfs-progs: gitignore: add GNUmakefile 2026-10-27 9:16 ` Daniel Vacek @ 2026-10-27 9:29 ` Qu Wenruo 0 siblings, 0 replies; 6+ messages in thread From: Qu Wenruo @ 2026-10-27 9:29 UTC (permalink / raw) To: Daniel Vacek, Qu Wenruo; +Cc: linux-btrfs 在 2026/10/27 19:46, Daniel Vacek 写道: > On Tue, 27 Oct 2026 at 09:36, Qu Wenruo <wqu@suse.com> wrote: >> I use GNUmakefile to add extra compiling flags without modifying the >> existing Makefile: >> >> MAKEFLAGS += -j12 >> include Makefile >> >> So the GNUmakefile is more or less reflecting personal tastes, better to >> add it to gitignore. > > So better to add it to gitignore I guess ;-) Facepalm, I didn't notice what's going wrong until two lines later... > > --nX > >> Signed-off-by: Qu Wenruo <wqu@suse.com> >> --- >> GNUmakefile | 2 ++ >> 1 file changed, 2 insertions(+) >> create mode 100644 GNUmakefile >> >> diff --git a/GNUmakefile b/GNUmakefile >> new file mode 100644 >> index 000000000000..e0eaca65651c >> --- /dev/null >> +++ b/GNUmakefile >> @@ -0,0 +1,2 @@ >> +MAKEFLAGS += -j12 >> +include Makefile >> -- >> 2.56.0 >> >> > ^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2026-10-27 9:30 UTC | newest] Thread overview: 6+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2026-10-27 8:35 [PATCH 0/2] btrfs-progs: simple cleanup related to LLVM (not LLM) Qu Wenruo 2026-10-27 8:35 ` [PATCH 1/2] btrfs-progs: remove set but unused variables Qu Wenruo 2026-10-27 9:18 ` Daniel Vacek 2026-10-27 8:35 ` [PATCH 2/2] btrfs-progs: gitignore: add GNUmakefile Qu Wenruo 2026-10-27 9:16 ` Daniel Vacek 2026-10-27 9:29 ` Qu Wenruo
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox