From patchwork Thu Mar 20 16:05:21 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Laurent Pinchart X-Patchwork-Id: 22997 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 8F5A6C3301 for ; Thu, 20 Mar 2025 16:05:47 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id B7E8768950; Thu, 20 Mar 2025 17:05:46 +0100 (CET) Authentication-Results: lancelot.ideasonboard.com; dkim=pass (1024-bit key; unprotected) header.d=ideasonboard.com header.i=@ideasonboard.com header.b="LCMt72+M"; dkim-atps=neutral Received: from perceval.ideasonboard.com (perceval.ideasonboard.com [213.167.242.64]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id E796B617F5 for ; Thu, 20 Mar 2025 17:05:44 +0100 (CET) Received: from pendragon.ideasonboard.com (unknown [157.231.223.213]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id 2792F220; Thu, 20 Mar 2025 17:04:01 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1742486641; bh=zTw5FLHhsbptv1+ocB+QFd8QA48xHEoVLzZKeVz2ehs=; h=From:To:Cc:Subject:Date:From; b=LCMt72+M0sUfGq9mpzU5pUxWKvjVD43XpbSzhnjn+ZyiEHTCdFXY6QmEOXjkNmCrT FQsW+QHMnZ2n9DN4/SeBK0CfiOOCLP/EPHIvAwOUtx7jWIDQo3bnK3vBdbzE2cqrI3 OpqXQDSHJr0z+EmAXVA3Qf4xX3xeA7KUO+LJAcBM= From: Laurent Pinchart To: libcamera-devel@lists.libcamera.org Cc: Naushir Patuck Subject: [PATCH] pipeline: rpi: pisp: Fix uninitialized variable warning Date: Thu, 20 Mar 2025 18:05:21 +0200 Message-ID: <20250320160521.301-1-laurent.pinchart@ideasonboard.com> X-Mailer: git-send-email 2.48.1 MIME-Version: 1.0 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: , Errors-To: libcamera-devel-bounces@lists.libcamera.org Sender: "libcamera-devel" gcc 13.3.0 from buildroot 2024.11.1 complains about an uninitialized variable. This is a false positive as the cfe_ array can't be empty. Nonetheless, it breaks builds, so initialize the variable to work around the issue. Signed-off-by: Laurent Pinchart Reviewed-by: Naushir Patuck Reviewed-by: Kieran Bingham --- src/libcamera/pipeline/rpi/pisp/pisp.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) base-commit: 841ef2b4bb08ba48470817ff1f838efcce377fee -- Regards, Laurent Pinchart diff --git a/src/libcamera/pipeline/rpi/pisp/pisp.cpp b/src/libcamera/pipeline/rpi/pisp/pisp.cpp index 0f9e332667c0..42ca7c80b10a 100644 --- a/src/libcamera/pipeline/rpi/pisp/pisp.cpp +++ b/src/libcamera/pipeline/rpi/pisp/pisp.cpp @@ -1700,7 +1700,7 @@ void PiSPCameraData::platformFreeBuffers() void PiSPCameraData::cfeBufferDequeue(FrameBuffer *buffer) { RPi::Stream *stream = nullptr; - int index; + int index = 0; if (!isRunning()) return;