From 27524864ccebbf45a57522b02a298e07d2d540a6 Mon Sep 17 00:00:00 2001 From: Michael Heimpold Date: Mon, 14 Oct 2024 14:25:36 +0200 Subject: [PATCH] ev_cli: attribute parameter of _gather_cmds with [[maybe_unused]] (#155) Without this attribute, interfaces without commands generate a lot of warnings since the parameter is not used inside the function. Signed-off-by: Michael Heimpold --- ev-dev-tools/src/ev_cli/templates/interface-Base.hpp.j2 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ev-dev-tools/src/ev_cli/templates/interface-Base.hpp.j2 b/ev-dev-tools/src/ev_cli/templates/interface-Base.hpp.j2 index 96eb3d5a..c253211d 100644 --- a/ev-dev-tools/src/ev_cli/templates/interface-Base.hpp.j2 +++ b/ev-dev-tools/src/ev_cli/templates/interface-Base.hpp.j2 @@ -107,7 +107,7 @@ private: std::shared_ptr error_manager; // helper function for getting all commands - void _gather_cmds(std::vector& cmds) override { + void _gather_cmds([[maybe_unused]] std::vector& cmds) override { {% if not cmds %} // this interface does not offer any commands {% else %}