aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorGravatar David Gow <davidgow@google.com> 2024-02-21 17:27:22 +0800
committerGravatar Shuah Khan <skhan@linuxfoundation.org> 2024-02-28 13:07:49 -0700
commit806cb2270237ce2ec672a407d66cee17a07d3aa2 (patch)
treef04b1a7d23c107451f7544f37e4b6e7283c760b0 /lib
parentdrm: tests: Fix invalid printf format specifiers in KUnit tests (diff)
downloadlinux-806cb2270237ce2ec672a407d66cee17a07d3aa2.tar.gz
linux-806cb2270237ce2ec672a407d66cee17a07d3aa2.tar.bz2
linux-806cb2270237ce2ec672a407d66cee17a07d3aa2.zip
kunit: Annotate _MSG assertion variants with gnu printf specifiers
KUnit's assertion macros have variants which accept a printf format string, to allow tests to specify a more detailed message on failure. These (and the related KUNIT_FAIL() macro) ultimately wrap the __kunit_do_failed_assertion() function, which accepted a printf format specifier, but did not have the __printf attribute, so gcc couldn't warn on incorrect agruments. It turns out there were quite a few tests with such incorrect arguments. Add the __printf() specifier now that we've fixed these errors, to prevent them from recurring. Suggested-by: Linus Torvalds <torvalds@linux-foundation.org> Signed-off-by: David Gow <davidgow@google.com> Tested-by: Guenter Roeck <linux@roeck-us.net> Reviewed-by: Justin Stitt <justinstitt@google.com> Signed-off-by: Shuah Khan <skhan@linuxfoundation.org>
Diffstat (limited to 'lib')
0 files changed, 0 insertions, 0 deletions