浏览代码

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.
Brad King 14 年之前
父节点
当前提交
a343bc1c76
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      Source/cmSystemTools.cxx

+ 1 - 1
Source/cmSystemTools.cxx

@@ -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)
         {
         {