selftests:x86: Fix Format String Warnings in lam.c
authorangquan yu <angquan21@gmail.com>
Wed, 29 Nov 2023 03:36:15 +0000 (21:36 -0600)
committerShuah Khan <skhan@linuxfoundation.org>
Thu, 30 Nov 2023 21:32:41 +0000 (14:32 -0700)
commit9686e7f59b142095ac6ad0763312ec68fc34c51a
treed77a870b7aad39bdd1b09f5b3e700514c8300c1a
parent5e551899788b0731761052f21febdfef668e511f
selftests:x86: Fix Format String Warnings in lam.c

This commit addresses compiler warnings in lam.c related to the usage
of non-literal format strings without format arguments in the
'run_test' function.

Warnings fixed:
- Resolved warnings indicating that 'ksft_test_result_skip' and
'ksft_test_result' were called with 't->msg' as a format string without
accompanying format arguments.

Changes made:
- Modified the calls to 'ksft_test_result_skip' and 'ksft_test_result'
to explicitly include a format specifier ("%s") for 't->msg'.
- This ensures that the string is safely treated as a format argument,
adhering to safer coding practices and resolving the compiler warnings.

Signed-off-by: angquan yu <angquan21@gmail.com>
Signed-off-by: Shuah Khan <skhan@linuxfoundation.org>
tools/testing/selftests/x86/lam.c