Skip to content

btrfs-progs: minor fixes for clang warnings

Qu Wenruo linux-btrfs 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest5 patches 4 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/5btrfs-progs: remove an unnecessary branch to silent the clang warningkernel-shared/ctree.c+10 -80 replies
2/5btrfs-progs: fix a false alert on an uninitialized variable when BUG_ON() is involved.kernel-shared/extent-tree.c kernel-shared/volumes.c+4 -30 replies
3/5btrfs-progs: fix fallthrough cases with proper attributescmds/reflink.c cmds/scrub.c common/format-output.c +6 more+63 -541 reply
4/5btrfs-progs: move a union with variable sized type to the endimage/main.c+5 -50 replies
5/5btrfs-progs: fix set but not used variablescmds/scrub.c image/main.c kernel-shared/zoned.c +1 more+2 -130 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [PATCH 0/5] btrfs-progs: minor fixes for clang warnings

Recently I'm migrating my default compiler from GCC to clang, mostly to get short comiling time (especially important on my aarch64 machines).

Thus I hit those (mostly false alerts) warnings in btrfs-progs, and come up with this patchset.

Unfortunately there is still libbtrfsutils causing warnings in setuptools, as it's still using the default flags from gcc no matter what.

Qu Wenruo (5):
btrfs-progs: remove an unnecessary branch to silent the clang warning
btrfs-progs: fix a false alert on an uninitialized variable when
BUG_ON() is involved.
btrfs-progs: fix fallthrough cases with proper attributes
btrfs-progs: move a union with variable sized type to the end
btrfs-progs: fix set but not used variables

 cmds/reflink.c              |  2 +-
 cmds/scrub.c                | 12 +++---
 common/format-output.c      |  2 +-
 common/parse-utils.c        | 12 +++---
 common/units.c              |  6 +--
 crypto/xxhash.c             | 73 +++++++++++++++++++------------------
 image/main.c                | 15 +++-----
 kerncompat.h                |  8 ++++
 kernel-shared/ctree.c       | 18 +++++----
 kernel-shared/extent-tree.c |  4 +-
 kernel-shared/print-tree.c  |  2 +-
 kernel-shared/volumes.c     |  3 +-
 kernel-shared/zoned.c       |  6 +--
 mkfs/main.c                 |  4 --
 14 files changed, 84 insertions(+), 83 deletions(-)
Signature · 1 line
2.39.1