From 4988196c478df59bdd70e488bd78db1ee5f3f103 Mon Sep 17 00:00:00 2001 From: Nick Bolton Date: Tue, 15 Apr 2025 23:11:25 +0100 Subject: [PATCH] fix(daemon): Use missing %s when logging XArchEvalWindows result --- src/lib/platform/MSWindowsProcess.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/lib/platform/MSWindowsProcess.cpp b/src/lib/platform/MSWindowsProcess.cpp index 096dccb4a..04b4a68ff 100644 --- a/src/lib/platform/MSWindowsProcess.cpp +++ b/src/lib/platform/MSWindowsProcess.cpp @@ -152,7 +152,7 @@ void MSWindowsProcess::shutdown(HANDLE handle, DWORD pid, int timeout) } } else { XArchEvalWindows error; - LOG_ERR("failed to get process exit code for process %d, error:", pid, error.eval().c_str()); + LOG_ERR("failed to get process exit code for process %d, error: %s", pid, error.eval().c_str()); } // Wait for process to exit gracefully. @@ -161,7 +161,7 @@ void MSWindowsProcess::shutdown(HANDLE handle, DWORD pid, int timeout) if (waitResult == WAIT_OBJECT_0) { // NOSONAR - Readability if (!GetExitCodeProcess(handle, &exitCode)) { XArchEvalWindows error; - LOG_ERR("failed to retrieve exit code after process exit for process %d, error:", pid, error.eval().c_str()); + LOG_ERR("failed to get exit code after process exit for process %d, error: %s", pid, error.eval().c_str()); } LOG_DEBUG("process %d was shutdown gracefully with exit code %d", pid, exitCode); @@ -171,7 +171,7 @@ void MSWindowsProcess::shutdown(HANDLE handle, DWORD pid, int timeout) LOG_WARN("process %d did not exit within the expected time", pid); } else { XArchEvalWindows error; - LOG_ERR("error waiting for process %d to exit, error:", pid, error.eval().c_str()); + LOG_ERR("error waiting for process %d to exit, error: %s", pid, error.eval().c_str()); } // Last resort, terminate the process forcefully. @@ -179,7 +179,7 @@ void MSWindowsProcess::shutdown(HANDLE handle, DWORD pid, int timeout) LOG_WARN("forcefully terminated process %d", pid); } else { XArchEvalWindows error; - LOG_ERR("failed to terminate process %d, error:", pid, error.eval().c_str()); + LOG_ERR("failed to terminate process %d, error: %s", pid, error.eval().c_str()); } }