Browse Source

Merge topic 'ctest-stray-newline'

9c6e53e46f ctest: Remove stray newline in process result string
48bb5a4e1c Merge branch 'upstream-KWSys' into ctest-stray-newline
bbb2370359 KWSys 2025-08-08 (2c189f30)

Acked-by: Kitware Robot <[email protected]>
Merge-request: !11045
Brad King 3 months ago
parent
commit
b8b6053ed9
3 changed files with 3 additions and 3 deletions
  1. 1 1
      Source/CTest/cmProcess.cxx
  2. 1 1
      Source/cmUVProcessChain.cxx
  3. 1 1
      Source/kwsys/ProcessWin32.c

+ 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);
       }

+ 1 - 1
Source/kwsys/ProcessWin32.c

@@ -2145,7 +2145,7 @@ static void kwsysProcessSetExitExceptionByIndex(kwsysProcess* cp, int code,
     default:
       cp->ProcessResults[idx].ExitException = kwsysProcess_Exception_Other;
       snprintf(cp->ProcessResults[idx].ExitExceptionString,
-               KWSYSPE_PIPE_BUFFER_SIZE, "Exit code 0x%x\n", code);
+               KWSYSPE_PIPE_BUFFER_SIZE, "Exit code 0x%x", code);
       break;
   }
 }