mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/
synced 2026-11-10 20:48:12 +00:00
selftests: harness: Mark test fixture objects __maybe_unused
Mark _##fixture_name##_##test_name##_object __maybe_unused since it may not ever be read. This pointer is only read in XFAIL_ADD(), which tests are not required to use. clang made a change to -Wunused-but-set-variable (split out into its own subwarning, -Wunused-but-set-global) that causes this warning to be emitted for various selftests and can be upgraded to an error in selftest that set -Werror. VFIO selftests have been broken since commitff556bd983("vfio: selftests: Add -Wall and -Werror to the Makefile"), and the net selftests builds have been noisy due to -Wall. Fixes:24cf65a622("selftests/harness: Share _metadata between forked processes") Reported-by: Kuniyuki Iwashima <kuniyu@google.com> Reported-by: Aaron Lewis <aaronlewis@google.com> Reviewed-by: Alex Williamson <alex@shazbot.org> Reviewed-by: Kuniyuki Iwashima <kuniyu@google.com> Signed-off-by: David Matlack <dmatlack@google.com> Reviewed-by: Nathan Chancellor <nathan@kernel.org> Link: https://lore.kernel.org/r/20260706183154.2660394-1-dmatlack@google.com Signed-off-by: Alex Williamson <alex@shazbot.org>
This commit is contained in:
parent
28ca5f67e1
commit
37ffa24c9d
1 changed files with 1 additions and 1 deletions
Loading…
Add table
Add a link
Reference in a new issue