[PATCH] utils: ipc: Fix event functions with no parameters

Paul Elder paul.elder at ideasonboard.com
Tue Apr 9 12:40:44 CEST 2024


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 <paul.elder at ideasonboard.com>
---
 .../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<uint8_t>::const_iterator data,
-	size_t dataSize,
+	[[maybe_unused]] std::vector<uint8_t>::const_iterator data,
+	[[maybe_unused]] size_t dataSize,
 	[[maybe_unused]] const std::vector<SharedFD> &fds)
 {
 {%- for param in method.parameters %}
-- 
2.39.2



More information about the libcamera-devel mailing list