From: Michael Jeanson Date: Tue, 8 Mar 2022 23:26:06 +0000 (-0500) Subject: Prepare for '-Wsign-compare' X-Git-Url: http://drtracing.org/?a=commitdiff_plain;h=9184924d53536411e905a158c51b572e92e4dbc4;p=deliverable%2Flttng-tools.git Prepare for '-Wsign-compare' In preparation for '-Wextra' Change-Id: I9a3b91009b2b44c0aeacfb37fa2b8b901be79992 Signed-off-by: Michael Jeanson Signed-off-by: Jérémie Galarneau --- diff --git a/tests/regression/tools/filtering/gen-ust-events.c b/tests/regression/tools/filtering/gen-ust-events.c index 3bd4ee832..d4f8a57bd 100644 --- a/tests/regression/tools/filtering/gen-ust-events.c +++ b/tests/regression/tools/filtering/gen-ust-events.c @@ -28,7 +28,7 @@ int main(int argc, char **argv) double dbl = 2.0; float flt = 2222.0; /* Generate 30 events. */ - unsigned int nr_iter = 100; + int nr_iter = 100; useconds_t nr_usec = 0; if (argc >= 2) { diff --git a/tests/utils/testapp/gen-kernel-test-events/gen-kernel-test-events.c b/tests/utils/testapp/gen-kernel-test-events/gen-kernel-test-events.c index 6b16cd5e6..5e488f982 100644 --- a/tests/utils/testapp/gen-kernel-test-events/gen-kernel-test-events.c +++ b/tests/utils/testapp/gen-kernel-test-events/gen-kernel-test-events.c @@ -60,7 +60,7 @@ int main(int argc, char **argv) } len = write(fd, nr_events_str, strlen(nr_events_str) + 1); - if (len != strlen(nr_events_str) + 1) { + if (len != (ssize_t) strlen(nr_events_str) + 1) { perror("write"); ret = -1; } else {