tests: Fix -Wformat gcc warning
authorAnoop C S <anoopcs@redhat.com>
Tue, 28 Aug 2018 16:41:31 +0000 (22:11 +0530)
committerAndreas Schneider <asn@samba.org>
Tue, 23 Oct 2018 13:39:01 +0000 (15:39 +0200)
test_fork_thread_deadlock.c:48:25: warning: format ‘%d’ expects argument
    of type ‘int’, but argument 3 has type ‘pid_t {aka long int}’ [-Wformat=]

Signed-off-by: Anoop C S <anoopcs@redhat.com>
Reviewed-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
tests/test_fork_thread_deadlock.c

index 6cd1ca0af3b406168abc3a4645da03ab789ecf78..7d4d4a765b30015710dad0093b19af093477d3ba 100644 (file)
@@ -45,7 +45,7 @@
 
 static void test_swrap_signal_handler(int signum)
 {
-       fprintf(stderr, "PID: %d, SIGNUM: %d\n", getpid(), signum);
+       fprintf(stderr, "PID: %u, SIGNUM: %d\n", (unsigned int)getpid(), signum);
        write(1, "DEADLOCK?\n", 10);
 }