From patchwork Thu Feb 15 08:23:42 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Naushir Patuck X-Patchwork-Id: 19500 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 1BD09BDE17 for ; Thu, 15 Feb 2024 08:50:26 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id 5702E62805; Thu, 15 Feb 2024 09:50:25 +0100 (CET) Authentication-Results: lancelot.ideasonboard.com; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=raspberrypi.com header.i=@raspberrypi.com header.b="FKZTduAV"; dkim-atps=neutral Received: from mail-ed1-x535.google.com (mail-ed1-x535.google.com [IPv6:2a00:1450:4864:20::535]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id 3551B61CAC for ; Thu, 15 Feb 2024 09:50:23 +0100 (CET) Received: by mail-ed1-x535.google.com with SMTP id 4fb4d7f45d1cf-563b49a0f44so441148a12.0 for ; Thu, 15 Feb 2024 00:50:23 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=raspberrypi.com; s=google; t=1707987022; x=1708591822; darn=lists.libcamera.org; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=k66RVLFcJ68NNczCWSJKtTsoHqWlJbQNmNwHaUxKGXk=; b=FKZTduAVI0SAZHGobFwzJ1VHpPpsmr25bzKMLIQQYIASt+q5TG37sWEIU+noPG7oPi e2GYirRq2eWzVZ/Q3xCU3IJl+gqAY+SpQRce3te0EkxBpAaspbB0DGSBSoNQGO3FNWTF +d2Itfenab4X6RkIlM9cKAkrSGAx3vzUI6n9+6Ij340EuGNTg3AXBXqeHVKC2fO0PvwK wJxl98n89f/4eFTN1LOwtlxVylmZ76RIagL0vJ9u69hdz25QKoC8TT0hCt7Qh7OuxUGK D+EpDIEyw9CSN2Bm0HY8Yu5TNCJQYdBjL9hJQNfpKe9tmWHWIsyC92M773Vte0jiV/dg 6vSA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1707987022; x=1708591822; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=k66RVLFcJ68NNczCWSJKtTsoHqWlJbQNmNwHaUxKGXk=; b=XViJ96EKcTkaFKp/t/ua+ItmdrIDimF3H2xG+kRoGAeamK9+qAnZldfhn2q2DBk5M4 s1lr7GE0W7tG8GR8smBZAU/R0O8LE2LocW1fyethKvmiMX1sgSEgIDvoOcHE5USGKZZQ ooQubNYXrVBW2yepMO2GMXw/0KKHQzyhqI+bZyhARoQahhtr0sF0/AiMteAOBHMCxQ4M xTLKwoqRSwk2GEBcBmY/Jb/p2gpEghAD/MhYwTEZlNrfMEMdRA3qZisdbTe87wGFIk7t nojdBioYOG/WwnQRnyJTboCLrwiD6DG6bUFDhh3Hgr6ZLrgxdcECfBv+lWxdxkR/ftms Q4AQ== X-Gm-Message-State: AOJu0YwbcUg07s/ER1L+XciMkg8GzI75VdptJdOjclHEWDR2cEg5BFn2 vRl0kkt3XjTLIutj/2z0ROf4D3XaeHP9nlygwkMUyjDQL7pfDwbU4MpQUn6mYpf2Usxr1iLwhEO 9 X-Google-Smtp-Source: AGHT+IHZ2QpUPjlOIDvappYRrZds1aEuPdYnGcbr8MtWZblSTRnbe3ijwuTGXbP2+5w4sLAnq8XDzw== X-Received: by 2002:a17:906:e24e:b0:a3d:a74b:e3d5 with SMTP id gq14-20020a170906e24e00b00a3da74be3d5mr237745ejb.31.1707987022086; Thu, 15 Feb 2024 00:50:22 -0800 (PST) Received: from localhost.localdomain ([188.39.149.98]) by smtp.gmail.com with ESMTPSA id w24-20020a170906131800b00a3d22f53210sm322851ejb.188.2024.02.15.00.50.21 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 15 Feb 2024 00:50:21 -0800 (PST) From: Naushir Patuck To: libcamera-devel@lists.libcamera.org Subject: [PATCH v1] utils: mojom: Fix build error caused by the mojom tool update Date: Thu, 15 Feb 2024 08:23:42 +0000 Message-Id: <20240215082342.6437-1-naush@raspberrypi.com> X-Mailer: git-send-email 2.34.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" The update to the mojom tool in commit d17de86904f0 causes build errors with gcc 12.2 release builds. One such error is: In file included from src/libcamera/proxy/worker/raspberrypi_ipa_proxy_worker.cpp:18: In static member function ‘static libcamera::ipa::RPi::ProcessParams libcamera::IPADataSerializer::deserialize(std::vector::const_iterator, std::vector::const_iterator, libcamera::ControlSerializer*)’, inlined from ‘void IPAProxyRPiWorker::readyRead()’ at src/libcamera/proxy/worker/raspberrypi_ipa_proxy_worker.cpp:302:70: include/libcamera/ipa/raspberrypi_ipa_serializer.h:1172:32: error: ‘*(uint32_t*)((char*)&ret + offsetof(libcamera::ipa::RPi::ProcessParams, libcamera::ipa::RPi::ProcessParams::buffers.libcamera::ipa::RPi::BufferIds::bayer))’ may be used uninitialized [-Werror=maybe-uninitialized] 1172 | return ret; The failure is caused by the new auto-generated IPA interface not initialising POD types to a default value. This is because the updated mojom library uses a new mojom.ValueKind class to represent POD types, whereas the interface generator script uses the mojom.Kind class, which is correct for the older mojom library. Fix this breakage by switching the interface generator script to use mojom.ValueKind to test for POD types. Fixes: d17de86904f0 ("utils: ipc: Update mojo") Signed-off-by: Naushir Patuck Reviewed-by: Paul Elder Acked-by: Kieran Bingham --- utils/ipc/generators/mojom_libcamera_generator.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/utils/ipc/generators/mojom_libcamera_generator.py b/utils/ipc/generators/mojom_libcamera_generator.py index 582818c98b5f..99d905de456c 100644 --- a/utils/ipc/generators/mojom_libcamera_generator.py +++ b/utils/ipc/generators/mojom_libcamera_generator.py @@ -72,7 +72,7 @@ def ParamsCommaSep(l): def GetDefaultValue(element): if element.default is not None: return element.default - if type(element.kind) == mojom.Kind: + if type(element.kind) == mojom.ValueKind: return '0' if IsFlags(element): return ''