]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
btrfs: print-tree: use string format for key names
authorDavid Sterba <dsterba@suse.com>
Fri, 26 Sep 2025 06:32:56 +0000 (08:32 +0200)
committerDavid Sterba <dsterba@suse.com>
Mon, 24 Nov 2025 20:37:36 +0000 (21:37 +0100)
commit9594783e4b4901cbc28ff940eff7e2554a4f7801
treeb721b72174c1498fb6ad1b41197d83493cc280db
parent4e700ac62ac12ffe8579680e6987b27066339d71
btrfs: print-tree: use string format for key names

There's a warning when -Wformat=2 is used:

fs/btrfs/print-tree.c: In function ‘key_type_string’:
fs/btrfs/print-tree.c:424:17: warning: format not a string literal and no format arguments [-Wformat-nonliteral]
  424 |                 scnprintf(buf, buf_size, key_to_str[key->type]);

We're printing fixed strings from a table so there's no problem but
let's fix the warning so we could enable the warning in fs/btrfs/.

Reviewed-by: Johannes Thumshirn <johannes.thumshirn@wdc.com>
Signed-off-by: David Sterba <dsterba@suse.com>
fs/btrfs/print-tree.c