tweak to avoid clang compilation failure

git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@29251 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
rfm 2010-01-09 19:26:59 +00:00
parent 91e22a6407
commit cc9250b32e

View file

@ -1633,27 +1633,29 @@ GSPrivateCheckTasks()
} }
else if (result == _taskId || (result > 0 && errno == 0)) else if (result == _taskId || (result > 0 && errno == 0))
{ {
if (WIFEXITED(_terminationStatus)) int status = [self terminationStatus];
if (WIFEXITED(status))
{ {
#ifdef WAITDEBUG #ifdef WAITDEBUG
NSLog(@"waitpid %d, termination status = %d", NSLog(@"waitpid %d, termination status = %d",
_taskId, _terminationStatus); _taskId, status);
#endif #endif
[self _terminatedChild: WEXITSTATUS(_terminationStatus)]; [self _terminatedChild: WEXITSTATUS(status)];
} }
else if (WIFSIGNALED(_terminationStatus)) else if (WIFSIGNALED(status))
{ {
#ifdef WAITDEBUG #ifdef WAITDEBUG
NSLog(@"waitpid %d, termination status = %d", NSLog(@"waitpid %d, termination status = %d",
_taskId, _terminationStatus); _taskId, status);
#endif #endif
[self _terminatedChild: WTERMSIG(_terminationStatus)]; [self _terminatedChild: WTERMSIG(status)];
} }
#ifdef WAITDEBUG #ifdef WAITDEBUG
else else
{ {
NSLog(@"waitpid %d, event status = %d", NSLog(@"waitpid %d, event status = %d",
_taskId, _terminationStatus); _taskId, status);
} }
#endif #endif
} }