From: Dmitry V. Levin Date: Wed, 23 Feb 2011 00:27:12 +0000 (+0000) Subject: Fix compilation warning reported by gcc -Wunused-but-set-variable X-Git-Tag: v4.6~28 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=d9a4b0ab00e9262411d2420f33f067d484431520;p=strace Fix compilation warning reported by gcc -Wunused-but-set-variable * process.c (printwaitn) [!SUNOS4]: Do not define "exited" variable. --- diff --git a/process.c b/process.c index b32c3b1f..c6cd61f1 100644 --- 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???");