diff options
author | Francois Bertel <francois.bertel@kitware.com> | 2009-03-16 21:13:14 (GMT) |
---|---|---|
committer | Francois Bertel <francois.bertel@kitware.com> | 2009-03-16 21:13:14 (GMT) |
commit | d0b32b42a16ce16d56eb1fd85a82314e700df810 (patch) | |
tree | 734b9f7cf0042c28f5115604b7f33d56d13d5472 /Source/kwsys/ProcessUNIX.c | |
parent | 493f88ce553ec7e39db83bd1bdf5c0896420c52d (diff) | |
download | CMake-d0b32b42a16ce16d56eb1fd85a82314e700df810.zip CMake-d0b32b42a16ce16d56eb1fd85a82314e700df810.tar.gz CMake-d0b32b42a16ce16d56eb1fd85a82314e700df810.tar.bz2 |
COMP:Fixed gcc 4.3.2 warning with -O1 and above: ignoring return value of read'), declared with attribute warn_unused_result
Diffstat (limited to 'Source/kwsys/ProcessUNIX.c')
-rw-r--r-- | Source/kwsys/ProcessUNIX.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/Source/kwsys/ProcessUNIX.c b/Source/kwsys/ProcessUNIX.c index 5d163ac..eabbb26 100644 --- a/Source/kwsys/ProcessUNIX.c +++ b/Source/kwsys/ProcessUNIX.c @@ -2140,7 +2140,8 @@ static void kwsysProcessChildErrorExit(int errorPipe) strncpy(buffer, strerror(errno), KWSYSPE_PIPE_BUFFER_SIZE); /* Report the error to the parent through the special pipe. */ - write(errorPipe, buffer, strlen(buffer)); + kwsysProcess_ssize_t result=write(errorPipe, buffer, strlen(buffer)); + (void)result; /* Terminate without cleanup. */ _exit(1); @@ -2641,8 +2642,10 @@ static void kwsysProcessesSignalHandler(int signum /* Set the pipe in a signalled state. */ char buf = 1; kwsysProcess* cp = kwsysProcesses.Processes[i]; - read(cp->PipeReadEnds[KWSYSPE_PIPE_SIGNAL], &buf, 1); - write(cp->SignalPipe, &buf, 1); + kwsysProcess_ssize_t status= + read(cp->PipeReadEnds[KWSYSPE_PIPE_SIGNAL], &buf, 1); + status=write(cp->SignalPipe, &buf, 1); + } } |