From db3147743368b14b3ed218cb3f6026cb7963d77c Mon Sep 17 00:00:00 2001 From: Laurent Pinchart Date: Wed, 6 Dec 2023 19:57:06 +0200 Subject: test: log: log_process: Fix uninitialized variable on process exit failure If the process fails to exit before the timeout, the LogProcessTest::exitStatus_ variable gets used uninitialized. Fix it by initializating to Process::NotExited. Signed-off-by: Laurent Pinchart Reviewed-by: Kieran Bingham --- test/log/log_process.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'test/log') diff --git a/test/log/log_process.cpp b/test/log/log_process.cpp index 17af7d74..f7635b70 100644 --- a/test/log/log_process.cpp +++ b/test/log/log_process.cpp @@ -139,7 +139,7 @@ private: ProcessManager processManager_; Process proc_; - Process::ExitStatus exitStatus_; + Process::ExitStatus exitStatus_ = Process::NotExited; string logPath_; int exitCode_; int num_; -- cgit v1.2.1