From patchwork Sat May 25 16:50:55 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Barnab=C3=A1s_P=C5=91cze?= X-Patchwork-Id: 20100 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 79D75BDE6B for ; Sat, 25 May 2024 16:51:13 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id 4DC86634AF; Sat, 25 May 2024 18:51:12 +0200 (CEST) Authentication-Results: lancelot.ideasonboard.com; dkim=pass (2048-bit key; unprotected) header.d=protonmail.com header.i=@protonmail.com header.b="usT8N9af"; dkim-atps=neutral Received: from mail-40134.protonmail.ch (mail-40134.protonmail.ch [185.70.40.134]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id 3CCE261A47 for ; Sat, 25 May 2024 18:51:01 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=protonmail.com; s=protonmail3; t=1716655860; x=1716915060; bh=xTR0sL9+RSp7W3ozwYHV74e0uRhqB2FJCVMwI1q1oqE=; h=Date:To:From:Subject:Message-ID:Feedback-ID:From:To:Cc:Date: Subject:Reply-To:Feedback-ID:Message-ID:BIMI-Selector; b=usT8N9af4uh072yHSDDrDoEvQKHvZgsYFFf0yC22Jl4XVbNAozY/9hlaoR2g8V7EU uagqBOBpfyOxHZHIkYKHq4m5xB9MtimJ5e/f5aLDA/UMSqfZvi3c57uSflEGcsdbr3 DIuw9T2OnWKU4/QbMwVFZek7+snOxbmkC8zZJsgP/r4b3aHcg1eTuMRvnuz26Yjh/V mY+HRm6LdB5uNzl2PaZH/YixI5bpPu06n9Y/1/erj+UQ2Mhhm9d/Ng4B/5IYOrrb/o RJysOZHDf9q6Y1yHlkvkIy/BdzRaFmdmrOXqZ2tTkClKuHVluMisnDNLkJuQvGLeYB 4d/k/Z4Q/On4w== Date: Sat, 25 May 2024 16:50:55 +0000 To: libcamera-devel@lists.libcamera.org From: =?utf-8?q?Barnab=C3=A1s_P=C5=91cze?= Subject: [PATCH v1] android: camera_capabilities: Fix GCC 14 warning Message-ID: <20240525165053.46330-1-pobrn@protonmail.com> Feedback-ID: 20568564:user:proton X-Pm-Message-ID: cb318b70f856f97dd70fb09f80ff5ec77adfd1e5 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 14 thinks `rects` is a "possibly dangling reference to a temporary", which causes the compilation to fail due to the use of `-Werror`. Fix this by not using a reference. Signed-off-by: Barnabás Pőcze Reviewed-by: Kieran Bingham --- src/android/camera_capabilities.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/android/camera_capabilities.cpp b/src/android/camera_capabilities.cpp index 6f4d48de..71043e12 100644 --- a/src/android/camera_capabilities.cpp +++ b/src/android/camera_capabilities.cpp @@ -1081,7 +1081,7 @@ int CameraCapabilities::initializeStaticMetadata() } { - const Span &rects = + const Span rects = properties.get(properties::PixelArrayActiveAreas).value_or(Span{}); std::vector data{ static_cast(rects[0].x),