diff options
| author | Sasha Levin <sashal@kernel.org> | 2026-11-03 10:55:08 -0500 |
|---|---|---|
| committer | Christian Brauner <brauner@kernel.org> | 2026-11-05 22:55:58 +0100 |
| commit | de48f2a93e4f246a1dbb3c93dc777061e5861bd4 (patch) | |
| tree | df611b0bf27ee8b00c11c5dc4a6538b506d8e76a /include/linux/workqueue_api.h | |
| parent | a45d356ad21071a79223e023efec842be2c54968 (diff) | |
selftests/statmount: fix format warnings on 32-bit and s390
The f_type field of struct statfs is an int on i386 and armhf and an
unsigned int on s390x, and the listmount() results are uint64_t, so
printing them with %lx and %zi warns:
statmount_test_ns.c:243:56: warning: format '%zi' expects argument of type 'signed size_t', but argument 2 has type 'uint64_t' {aka 'long long unsigned int'} [-Wformat=]
Cast f_type to unsigned long, and print the listmount() results as
unsigned long long.
On i386 and armhf the comparison next to it also sign-extends f_type to
the 64-bit sb_magic, so a file system with the top bit set in its magic,
such as btrfs, fails the test. Compare against the same cast.
Signed-off-by: Sasha Levin <sashal@kernel.org>
Link: https://patch.msgid.link/20261103155508.535010-1-sashal@kernel.org
Signed-off-by: Christian Brauner (Amutable) <brauner@kernel.org>
Diffstat (limited to 'include/linux/workqueue_api.h')
0 files changed, 0 insertions, 0 deletions
