From patchwork Wed Dec 6 21:05:20 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Laurent Pinchart X-Patchwork-Id: 19296 Return-Path: X-Original-To: parsemail@patchwork.libcamera.org Delivered-To: parsemail@patchwork.libcamera.org Received: from lancelot.ideasonboard.com (lancelot.ideasonboard.com [92.243.16.209]) by patchwork.libcamera.org (Postfix) with ESMTPS id 2E204C32BC for ; Wed, 6 Dec 2023 21:05:23 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id 1BC93629E3; Wed, 6 Dec 2023 22:05:22 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=libcamera.org; s=mail; t=1701896722; bh=Sh2/l5RBOsroloGi5qyXJC0ChhAApGVlQ/WjFwco3rQ=; h=To:Date:In-Reply-To:References:Subject:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To: From; b=L2svlrDGPw8zVZsyoQkvytRcVc7MyW7ra1K7VqySDH/uaIDZbjBbIuq4SxOqtBydm LW6FFwU5tTD41NVeF7fkBZPNVtKov3cAAH1jxdVNHDsRLieW52+CH6RuM/K0amz9BT ofF75IjXzJbWKXllMYJw2zO5KTk/ltBknmHVtqSv1S5ltl1l/tVzl+NL02nhtN7Q5S +Qj7WcifBykKWozfSzzUWJ2NHDWoukUGdwmkVlbGyVDEd4TMfmM6PswtqeUZqFq0Es 5oyeJDJTCzI+KgrxQlCxTTsjcX6ACkb8oHZ0eynw8WBkGIxgV+D4qvxKnvsE0D6pTd ieSAeIC1EW4eQ== Received: from perceval.ideasonboard.com (perceval.ideasonboard.com [213.167.242.64]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id B4D5F61D9E for ; Wed, 6 Dec 2023 22:05:20 +0100 (CET) Authentication-Results: lancelot.ideasonboard.com; dkim=pass (1024-bit key; unprotected) header.d=ideasonboard.com header.i=@ideasonboard.com header.b="nn8vOd4F"; dkim-atps=neutral Received: from pendragon.ideasonboard.com (213-243-189-158.bb.dnainternet.fi [213.243.189.158]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id B697CE45 for ; Wed, 6 Dec 2023 22:04:39 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1701896679; bh=Sh2/l5RBOsroloGi5qyXJC0ChhAApGVlQ/WjFwco3rQ=; h=From:To:Subject:Date:In-Reply-To:References:From; b=nn8vOd4FfVqlTSoAkp/zgRR8POv0wgP7yVbD0GjmUp8BPjYynKx+puXndHq4kzo+i 9WafvCevTG/k+63hySxpi5m6iGAi9LNYOKxLZsZ+YAqggiEbh36hzwuHNL02clkwBi LaOD62mLZUlB4sKRXEH2kHssqD5T7eRoEzlnANxE= To: libcamera-devel@lists.libcamera.org Date: Wed, 6 Dec 2023 23:05:20 +0200 Message-ID: <20231206210524.20974-3-laurent.pinchart@ideasonboard.com> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20231206210524.20974-1-laurent.pinchart@ideasonboard.com> References: <20231206210524.20974-1-laurent.pinchart@ideasonboard.com> MIME-Version: 1.0 Subject: [libcamera-devel] [PATCH 2/6] test: log: log_process: Fix uninitialized variable on process exit failure X-BeenThere: libcamera-devel@lists.libcamera.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-Patchwork-Original-From: Laurent Pinchart via libcamera-devel From: Laurent Pinchart Reply-To: Laurent Pinchart Errors-To: libcamera-devel-bounces@lists.libcamera.org Sender: "libcamera-devel" 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 Reviewed-by: Umang Jain --- test/log/log_process.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/log/log_process.cpp b/test/log/log_process.cpp index 17af7d74a1d5..f7635b70255c 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_;