aboutsummaryrefslogtreecommitdiff
path: root/scripts/gdb/linux
diff options
context:
space:
mode:
authorRichard Fitzgerald <rf@opensource.cirrus.com>2023-11-06 17:25:57 +0000
committerShuah Khan <skhan@linuxfoundation.org>2023-11-14 13:01:57 -0700
commit1bddcf77ce6668692fc15e968fd0870d5524d112 (patch)
tree47836258df20056d26bb61434f8f6e3b91e289e1 /scripts/gdb/linux
parent2e3c94aed51eabbe9c1c0ee515371ea5441c2fa7 (diff)
kunit: test: Avoid cast warning when adding kfree() as an action
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: 05e2006ce493 ("kunit: Use string_stream for test log") Reviewed-by: David Gow <davidgow@google.com> Signed-off-by: Shuah Khan <skhan@linuxfoundation.org>
Diffstat (limited to 'scripts/gdb/linux')
0 files changed, 0 insertions, 0 deletions