mirror of
https://github.com/torvalds/linux.git
synced 2024-12-03 01:21:28 +00:00
1bddcf77ce
In kunit_log_test() pass the kfree_wrapper() function to kunit_add_action()
instead of directly passing kfree().
This prevents a cast warning:
lib/kunit/kunit-test.c:565:25: warning: cast from 'void (*)(const void *)'
to 'kunit_action_t *' (aka 'void (*)(void *)') converts to incompatible
function type [-Wcast-function-type-strict]
564 full_log = string_stream_get_string(test->log);
> 565 kunit_add_action(test, (kunit_action_t *)kfree, full_log);
Signed-off-by: Richard Fitzgerald <rf@opensource.cirrus.com>
Reported-by: kernel test robot <lkp@intel.com>
Closes: https://lore.kernel.org/oe-kbuild-all/202311070041.kWVYx7YP-lkp@intel.com/
Fixes:
|
||
---|---|---|
.. | ||
.kunitconfig | ||
assert.c | ||
attributes.c | ||
debugfs.c | ||
debugfs.h | ||
executor_test.c | ||
executor.c | ||
hooks-impl.h | ||
hooks.c | ||
Kconfig | ||
kunit-example-test.c | ||
kunit-test.c | ||
Makefile | ||
resource.c | ||
static_stub.c | ||
string-stream-test.c | ||
string-stream.c | ||
string-stream.h | ||
test.c | ||
try-catch-impl.h | ||
try-catch.c |