From patchwork Fri Sep 2 14:11:36 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Marco Felsch X-Patchwork-Id: 17280 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 53273C3272 for ; Fri, 2 Sep 2022 14:11:41 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id AD21261F9D; Fri, 2 Sep 2022 16:11:40 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=libcamera.org; s=mail; t=1662127900; bh=yhvASHcMzFwJ4IPw7Im0GztuhHRdYPFfO72hQE0LQfE=; h=To:Date:Subject:List-Id:List-Unsubscribe:List-Archive:List-Post: List-Help:List-Subscribe:From:Reply-To:Cc:From; b=yGwB3HEbVcN7mrIEzBiZTSAvTOgnnAGH/1ezmTDPANKlTq7+//Fktjp1blBU0s1Zm W3NZF5otbRVxo0Lx5GP2Q4edPghDYFvZjcHnzKTQwgUYw0Qx3/5AYVb4DwiQuQDBim 4XFlUK/t4fWbh8MNoG79KJolb9i2aY6j4/cmvX7gFLagRYGRaPXMOMsqGgB5Xha/6t usHePTioLNnymxRNxkbwXB1WMJ76BqA/1xQXibEXDotLDfTrhrgHWJQaVaA8Gh9UAn XL6gSEFzijqEb+XUxRe/HbajNqqXK13yOQXaUxgYSXi612uAhvIXcImZuJbQ3Sl2mk I35rwWKS+8JPw== Received: from metis.ext.pengutronix.de (metis.ext.pengutronix.de [IPv6:2001:67c:670:201:290:27ff:fe1d:cc33]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id 6B7CC61F9D for ; Fri, 2 Sep 2022 16:11:39 +0200 (CEST) Received: from drehscheibe.grey.stw.pengutronix.de ([2a0a:edc0:0:c01:1d::a2]) by metis.ext.pengutronix.de with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1oU7OU-0006u3-Ta; Fri, 02 Sep 2022 16:11:38 +0200 Received: from [2a0a:edc0:0:1101:1d::28] (helo=dude02.red.stw.pengutronix.de) by drehscheibe.grey.stw.pengutronix.de with esmtp (Exim 4.94.2) (envelope-from ) id 1oU7OS-003VS1-6x; Fri, 02 Sep 2022 16:11:38 +0200 Received: from mfe by dude02.red.stw.pengutronix.de with local (Exim 4.94.2) (envelope-from ) id 1oU7OT-005dDj-DF; Fri, 02 Sep 2022 16:11:37 +0200 To: libcamera-devel@lists.libcamera.org Date: Fri, 2 Sep 2022 16:11:36 +0200 Message-Id: <20220902141136.1342352-1-m.felsch@pengutronix.de> X-Mailer: git-send-email 2.30.2 MIME-Version: 1.0 X-SA-Exim-Connect-IP: 2a0a:edc0:0:c01:1d::a2 X-SA-Exim-Mail-From: mfe@pengutronix.de X-SA-Exim-Scanned: No (on metis.ext.pengutronix.de); SAEximRunCond expanded to false X-PTX-Original-Recipient: libcamera-devel@lists.libcamera.org Subject: [libcamera-devel] [PATCH] qcam: viewfinder_gl: selectColorSpace: fix maybe uninitialized warning 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: Marco Felsch via libcamera-devel From: Marco Felsch Reply-To: Marco Felsch Cc: mfe@pengutronix.de Errors-To: libcamera-devel-bounces@lists.libcamera.org Sender: "libcamera-devel" Fix gcc11 warning introduced in commit 251f0534 ("qcam: viewfinder_gl: Take color space into account for YUV rendering"). Fix it by making the full range as default. Fixes: 251f0534 ("qcam: viewfinder_gl: Take color space into account for YUV rendering") Signed-off-by: Marco Felsch Reviewed-by: Laurent Pinchart --- src/qcam/viewfinder_gl.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/src/qcam/viewfinder_gl.cpp b/src/qcam/viewfinder_gl.cpp index e2aa2470..501c5bae 100644 --- a/src/qcam/viewfinder_gl.cpp +++ b/src/qcam/viewfinder_gl.cpp @@ -367,6 +367,7 @@ void ViewFinderGL::selectColorSpace(const libcamera::ColorSpace &colorSpace) double offset; switch (colorSpace.range) { + default: /* Avoid gcc11 maybe-uninitialized warning */ case libcamera::ColorSpace::Range::Full: offset = 0.0; break;