Commit f65968ac authored by Daniel Latypov's avatar Daniel Latypov Committed by Shuah Khan

kunit: fix -Wunused-function warning for __kunit_fail_current_test

When CONFIG_KUNIT is not enabled, __kunit_fail_current_test() an empty
static function.

But GCC complains about unused static functions, *unless* they're static
inline.  So add inline to make GCC happy.

Fixes: 359a3760 ("kunit: support failure from dynamic analysis tools")
Reported-by: default avatarStephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: default avatarDaniel Latypov <dlatypov@google.com>
Reviewed-by: default avatarBrendan Higgins <brendanhiggins@google.com>
Signed-off-by: default avatarShuah Khan <skhan@linuxfoundation.org>
parent 359a3760
...@@ -19,8 +19,8 @@ extern __printf(3, 4) void __kunit_fail_current_test(const char *file, int line, ...@@ -19,8 +19,8 @@ extern __printf(3, 4) void __kunit_fail_current_test(const char *file, int line,
#else #else
static __printf(3, 4) void __kunit_fail_current_test(const char *file, int line, static inline __printf(3, 4) void __kunit_fail_current_test(const char *file, int line,
const char *fmt, ...) const char *fmt, ...)
{ {
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment