]> granicus.if.org Git - strace/commitdiff
Fix compilation warning reported by gcc -Wunused-but-set-variable
authorDmitry V. Levin <ldv@altlinux.org>
Wed, 23 Feb 2011 00:27:12 +0000 (00:27 +0000)
committerDmitry V. Levin <ldv@altlinux.org>
Wed, 23 Feb 2011 00:27:12 +0000 (00:27 +0000)
* process.c (printwaitn) [!SUNOS4]: Do not define "exited" variable.

process.c

index b32c3b1f0baeef8e06b0c6a62541d9a970914f16..c6cd61f1bf3be25a5b61e9bfa1aa449e324004da 100644 (file)
--- a/process.c
+++ b/process.c
@@ -1898,7 +1898,9 @@ static int
 printwaitn(struct tcb *tcp, int n, int bitness)
 {
        int status;
+#ifdef SUNOS4
        int exited = 0;
+#endif
 
        if (entering(tcp)) {
 #ifdef LINUX
@@ -1928,7 +1930,10 @@ printwaitn(struct tcb *tcp, int n, int bitness)
                else if (umove(tcp, tcp->u_arg[1], &status) < 0)
                        tprintf("[?]");
                else
-                       exited = printstatus(status);
+#ifdef SUNOS4
+                       exited =
+#endif
+                       printstatus(status);
                /* options */
                tprintf(", ");
                printflags(wait4_options, tcp->u_arg[2], "W???");