From 9c6e53e46f0c7dba52d84df6dcadfeb1eb07a18a Mon Sep 17 00:00:00 2001 From: Brad King Date: Thu, 7 Aug 2025 10:01:33 -0400 Subject: [PATCH] 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 --- Source/CTest/cmProcess.cxx | 2 +- Source/cmUVProcessChain.cxx | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Source/CTest/cmProcess.cxx b/Source/CTest/cmProcess.cxx index eefbbcfd77..70a1ebde63 100644 --- a/Source/CTest/cmProcess.cxx +++ b/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); } diff --git a/Source/cmUVProcessChain.cxx b/Source/cmUVProcessChain.cxx index 4910653b33..e551083439 100644 --- a/Source/cmUVProcessChain.cxx +++ b/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(this->ExitStatus)); return std::make_pair(ExceptionCode::Other, buf); }