Browse Source

ctest: Remove stray newline in process result string

The plain "Exit code" string had a newline that we do not have in the
other result strings.  This typo was inherited from KWSys Process,
which has been fixed by its upstream.

Fixes: #27119
Brad King 4 months ago
parent
commit
9c6e53e46f
2 changed files with 2 additions and 2 deletions
  1. 1 1
      Source/CTest/cmProcess.cxx
  2. 1 1
      Source/cmUVProcessChain.cxx

+ 1 - 1
Source/CTest/cmProcess.cxx

@@ -536,7 +536,7 @@ std::string cmProcess::GetExitExceptionString() const
     case STATUS_NO_MEMORY:
     default:
       char buf[1024];
-      char const* fmt = "Exit code 0x%" KWIML_INT_PRIx64 "\n";
+      char const* fmt = "Exit code 0x%" KWIML_INT_PRIx64;
       snprintf(buf, sizeof(buf), fmt, this->ExitValue);
       exception_str.assign(buf);
   }

+ 1 - 1
Source/cmUVProcessChain.cxx

@@ -564,7 +564,7 @@ cmUVProcessChain::Status::GetException() const
       case STATUS_NO_MEMORY:
       default: {
         char buf[256];
-        snprintf(buf, sizeof(buf), "Exit code 0x%x\n",
+        snprintf(buf, sizeof(buf), "Exit code 0x%x",
                  static_cast<unsigned int>(this->ExitStatus));
         return std::make_pair(ExceptionCode::Other, buf);
       }