Skip to content

Commit 3c01655

Browse files
bonzinishuahkh
authored andcommitted
kselftest: ksft_test_num return type should be unsigned
Fixes a compiler warning: In file included from sync_test.c:37: ../kselftest.h: In function ‘ksft_print_cnts’: ../kselftest.h:78:16: warning: comparison of integer expressions of different signedness: ‘unsigned int’ and ‘int’ [-Wsign-compare] if (ksft_plan != ksft_test_num()) ^~ Signed-off-by: Paolo Bonzini <[email protected]> Signed-off-by: Shuah Khan <[email protected]>
1 parent 0b78c9e commit 3c01655

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

tools/testing/selftests/kselftest.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ struct ksft_count {
3636
static struct ksft_count ksft_cnt;
3737
static unsigned int ksft_plan;
3838

39-
static inline int ksft_test_num(void)
39+
static inline unsigned int ksft_test_num(void)
4040
{
4141
return ksft_cnt.ksft_pass + ksft_cnt.ksft_fail +
4242
ksft_cnt.ksft_xfail + ksft_cnt.ksft_xpass +

0 commit comments

Comments
 (0)