Fixes the following clang warning: utest/tracefs-utest.c:828:75: error: size argument in 'strncmp' call is a comparison [-Werror,-Wmemsize-comparison] (!save_debug || strncmp(save_debug, save_tracing, strlen(save_debug) != 0))) ~~~~~~~~~~~~~~~~~~~^~~~ utest/tracefs-utest.c:828:22: note: did you mean to compare the result of 'strncmp' instead? (!save_debug || strncmp(save_debug, save_tracing, strlen(save_debug) != 0))) ^ ~ ) utest/tracefs-utest.c:828:56: note: explicitly cast the argument to size_t to silence this warning (!save_debug || strncmp(save_debug, save_tracing, strlen(save_debug) != 0))) ^ (size_t)( ) Signed-off-by: Ian Rogers <irogers@xxxxxxxxxx> --- utest/tracefs-utest.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/utest/tracefs-utest.c b/utest/tracefs-utest.c index 629cf2b..e0e3c07 100644 --- a/utest/tracefs-utest.c +++ b/utest/tracefs-utest.c @@ -825,7 +825,7 @@ static void test_mounting(void) mount("debugfs", save_debug, "debugfs", 0, NULL); if (save_tracing && - (!save_debug || strncmp(save_debug, save_tracing, strlen(save_debug) != 0))) + (!save_debug || strncmp(save_debug, save_tracing, strlen(save_debug)) != 0)) mount("tracefs", save_tracing, "tracefs", 0, NULL); free(save_debug); -- 2.39.0.314.g84b9a713c41-goog