Skip to content

btrfs-progs: Make W=1 great (no "again")

Qu Wenruo linux-btrfs 2 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v2 Latest13 patches 5 repliesIn review
  2. v19 patches 20 repliesSuperseded

Changes in v2 from the cover letter

- Add reviewed-by tags, except the 7th patch, as it goes a different way to fix in v2.
- Fix bad port of cc-disable-warning, using $CFLAGS instead of kernel flags.
- Make sure fixed warnings still show in W=3.
- Use do {} while() loop to replace a while() {} loop, so even compiler doesn't have enough hint for BUG_ON(), it won't report uninitialized variable warning.

Patches in v2 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/13btrfs-progs: Makefile.extrawarn: Import cc-disable-warningMakefile.extrawarn+6 -00 replies
2/13btrfs-progs: fix gcc8 default build warning caused by '-Wformat-truncation'Makefile Makefile.extrawarn+7 -00 replies
3/13btrfs-progs: Makefile.extrawarn: Don't warn on sign compareMakefile.extrawarn+2 -00 replies
4/13btrfs-progs: Fix Wempty-body warningmessages.h+10 -52 replies
5/13btrfs-progs: Fix Wimplicit-fallthrough warningutils.c+22 -80 replies
6/13btrfs-progs: Fix Wsuggest-attribute=format warningstring-table.c+1 -00 replies
7/13btrfs-progs: Fix Wmaybe-uninitialized warningctree.c+2 -23 replies
8/13btrfs-progs: Fix Wtype-limits warningsend-stream.c+1 -20 replies
9/13btrfs-progs: Fix missing-prototypes warning caused by non-static functionsbtrfs.c check/mode-lowmem.c extent-tree.c +1 more+20 -200 replies
10/13btrfs-progs: Move btrfs_check_nodesize to fsfeatures.c to fix missing-prototypes warningfsfeatures.c utils.c+23 -230 replies
11/13btrfs-progs: Introduce rescue.h to resolve missing-prototypes for chunk and super rescuechunk-recover.c cmds-rescue.c rescue.h +1 more+24 -30 replies
12/13btrfs-progs: Add utils.h include to solve missing-prototypes warningutils-lib.c+1 -00 replies
13/13btrfs-progs: free-space-tree: Remove unsued functionfree-space-tree.c+0 -290 replies

Reviews trailers per patch

9 of 13 patches have a Reviewed-by or Acked-by.

PatchNikolay Borisov
1/13
2/13
3/13
4/13R-b
5/13R-b
6/13R-b
7/13
8/13R-b
9/13R-b
10/13R-b
11/13R-b
12/13R-b
13/13R-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v2 thread

Cover letter [PATCH v2 00/13] btrfs-progs: Make W=1 great (no "again")

This patchset can be fetched from github:
https://github.com/adam900710/btrfs-progs/tree/warning_fixes
Which is based on v4.19 tag.

This patchset will make "make W=1" reports no warning.

This patch will first introduce fix to Makefile.extrawarn to make "cc-disable-warning" works, then disable sign-compare warning completely, as we really don't want extra "unsigned" prefix to slow our typing.

Then re-use (ok, in fact rework) Yanjun's patch to disable formwat-truncation warning.

Finally, fix all the remaining warnings reported by make W=1.

Now, we make "make W=1" great (may 'again' or not, depending on the distribution rolling speed).

changelog:
v1.1:
- Use cc-disable-warning instead of putting -Wno-something to improve compatibility.
- Better explaination on the BUG_ON() branch caused uninitialized variable.
- Also cleanup free-space-tree.c

v2:
- Add reviewed-by tags, except the 7th patch, as it goes a different way to fix in v2.
- Fix bad port of cc-disable-warning, using $CFLAGS instead of kernel flags.
- Make sure fixed warnings still show in W=3.
- Use do {} while() loop to replace a while() {} loop, so even compiler doesn't have enough hint for BUG_ON(), it won't report uninitialized variable warning.

Qu Wenruo (12):
btrfs-progs: Makefile.extrawarn: Import cc-disable-warning
btrfs-progs: Makefile.extrawarn: Don't warn on sign compare
btrfs-progs: Fix Wempty-body warning
btrfs-progs: Fix Wimplicit-fallthrough warning
btrfs-progs: Fix Wsuggest-attribute=format warning
btrfs-progs: Fix Wmaybe-uninitialized warning
btrfs-progs: Fix Wtype-limits warning
btrfs-progs: Fix missing-prototypes warning caused by non-static
functions
btrfs-progs: Move btrfs_check_nodesize to fsfeatures.c to fix
missing-prototypes warning
btrfs-progs: Introduce rescue.h to resolve missing-prototypes for
chunk and super rescue
btrfs-progs: Add utils.h include to solve missing-prototypes warning
btrfs-progs: free-space-tree: Remove unsued function

Su Yanjun (1):
btrfs-progs: fix gcc8 default build warning caused by
'-Wformat-truncation'

 Makefile            |  5 ++++
 Makefile.extrawarn  | 10 ++++++++
 btrfs.c             |  2 +-
 check/mode-lowmem.c |  6 ++---
 chunk-recover.c     |  1 +
 cmds-rescue.c       |  4 +--
 ctree.c             |  4 +--
 extent-tree.c       |  2 +-
 free-space-tree.c   | 59 ++++++++++++---------------------------------
 fsfeatures.c        | 23 ++++++++++++++++++
 messages.h          | 15 ++++++++----
 rescue.h            | 21 ++++++++++++++++
 send-stream.c       |  3 +--
 string-table.c      |  1 +
 super-recover.c     |  1 +
 utils-lib.c         |  1 +
 utils.c             | 53 +++++++++++++++++-----------------------
 17 files changed, 119 insertions(+), 92 deletions(-)
 create mode 100644 rescue.h
Signature · 1 line
2.19.2