From patchwork Tue Apr 9 10:40:44 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Paul Elder X-Patchwork-Id: 19862 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 6CA63BE08B for ; Tue, 9 Apr 2024 10:41:00 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id 87B2463354; Tue, 9 Apr 2024 12:40:59 +0200 (CEST) Authentication-Results: lancelot.ideasonboard.com; dkim=pass (1024-bit key; unprotected) header.d=ideasonboard.com header.i=@ideasonboard.com header.b="TCnIOW4Q"; dkim-atps=neutral Received: from perceval.ideasonboard.com (perceval.ideasonboard.com [IPv6:2001:4b98:dc2:55:216:3eff:fef7:d647]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id 333016333F for ; Tue, 9 Apr 2024 12:40:58 +0200 (CEST) Received: from pyrite.hamster-moth.ts.net (h175-177-049-156.catv02.itscom.jp [175.177.49.156]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id 813A68B9; Tue, 9 Apr 2024 12:40:15 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1712659216; bh=ZzzRJAhRbc20aj8OQisnfgKoigom4LURvrYj72iDNco=; h=From:To:Cc:Subject:Date:From; b=TCnIOW4QSJXZyKy2nd9LsJo0qMugmRKyajI3ziVfCLNMC6JIjZ8/agYEPlyZ9ngtt QtYn0WkPEvAuS/4lKbH8JhtINi/ihO/B3RdMMYEu3ozAv8FbH4VuNOg3yC6r2pT3OF K114u1+tTI3sLzTn5XvmRYd9p2QuxkmgHSrjUDiI= From: Paul Elder To: libcamera-devel@lists.libcamera.org Cc: Paul Elder Subject: [PATCH] utils: ipc: Fix event functions with no parameters Date: Tue, 9 Apr 2024 19:40:44 +0900 Message-Id: <20240409104044.2107208-1-paul.elder@ideasonboard.com> X-Mailer: git-send-email 2.39.2 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" If an event function is defined with no parameters, there would be a compilation error complaining about unused parameters in the generated code for the data and dataSize parameters that would normally correspond to serialized data. Fix this by simply marking the parameters as maybe_unused. Signed-off-by: Paul Elder Reviewed-by: Laurent Pinchart Reviewed-by: Umang Jain --- .../generators/libcamera_templates/module_ipa_proxy.cpp.tmpl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/utils/ipc/generators/libcamera_templates/module_ipa_proxy.cpp.tmpl b/utils/ipc/generators/libcamera_templates/module_ipa_proxy.cpp.tmpl index c37c4941..238cf4a5 100644 --- a/utils/ipc/generators/libcamera_templates/module_ipa_proxy.cpp.tmpl +++ b/utils/ipc/generators/libcamera_templates/module_ipa_proxy.cpp.tmpl @@ -235,8 +235,8 @@ void {{proxy_name}}::recvMessage(const IPCMessage &data) } void {{proxy_name}}::{{method.mojom_name}}IPC( - std::vector::const_iterator data, - size_t dataSize, + [[maybe_unused]] std::vector::const_iterator data, + [[maybe_unused]] size_t dataSize, [[maybe_unused]] const std::vector &fds) { {%- for param in method.parameters %}