Skip to content

Commit a060ac0

Browse files
committed
selftests/landlock: Fix format warning for __u64 in net_test
On architectures where __u64 is unsigned long (e.g. powerpc64), using %llx to format a __u64 triggers a -Wformat warning because %llx expects unsigned long long. Cast the argument to unsigned long long. Cc: Günther Noack <gnoack@google.com> Cc: stable@vger.kernel.org Fixes: a549d05 ("selftests/landlock: Add network tests") Reported-by: kernel test robot <lkp@intel.com> Closes: https://lore.kernel.org/r/202604020206.62zgOTeP-lkp@intel.com/ Reviewed-by: Günther Noack <gnoack3000@gmail.com> Link: https://lore.kernel.org/r/20260402192608.1458252-6-mic@digikod.net Signed-off-by: Mickaël Salaün <mic@digikod.net>
1 parent 07c2572 commit a060ac0

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

tools/testing/selftests/landlock/net_test.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1356,7 +1356,7 @@ TEST_F(mini, network_access_rights)
13561356
&net_port, 0))
13571357
{
13581358
TH_LOG("Failed to add rule with access 0x%llx: %s",
1359-
access, strerror(errno));
1359+
(unsigned long long)access, strerror(errno));
13601360
}
13611361
}
13621362
EXPECT_EQ(0, close(ruleset_fd));

0 commit comments

Comments
 (0)