RunSingleCommand: Avoid assignment in condition

Several compilers warn about this case even when an extra layer of
parenthesis surrounds the assignment.  Make the condition explicit.
This commit is contained in:
Brad King 2011-07-28 09:04:45 -04:00
parent 642f10066a
commit a343bc1c76

View File

@ -615,7 +615,7 @@ bool cmSystemTools::RunSingleCommand(std::vector<cmStdString>const& command,
int pipe; int pipe;
if ( output || outputflag != OUTPUT_NONE ) if ( output || outputflag != OUTPUT_NONE )
{ {
while((pipe = cmsysProcess_WaitForData(cp, &data, &length, 0))) while((pipe = cmsysProcess_WaitForData(cp, &data, &length, 0)) > 0)
{ {
if(output || outputflag != OUTPUT_NONE) if(output || outputflag != OUTPUT_NONE)
{ {