From 54c07ed0f120d05172cfb134e1a41d3aee6adbb0 Mon Sep 17 00:00:00 2001 From: Benedek Kupper Date: Fri, 2 Aug 2024 16:26:26 +0200 Subject: [PATCH] get rid of some compiler warnings --- hid-rp/hid/rdf/parser.hpp | 25 ++++++++++++++----------- hid-rp/hid/report_protocol.hpp | 7 +++---- hid-rp/sized_unsigned.hpp | 1 + 3 files changed, 18 insertions(+), 15 deletions(-) diff --git a/hid-rp/hid/rdf/parser.hpp b/hid-rp/hid/rdf/parser.hpp index c51a5de..c7e67d0 100644 --- a/hid-rp/hid/rdf/parser.hpp +++ b/hid-rp/hid/rdf/parser.hpp @@ -128,10 +128,11 @@ class parser /// before this method is called) /// @return CONTINUE to continue the parsing until the next main item, /// or BREAK to terminate it early - constexpr virtual control parse_collection_begin(main::collection_type collection, - const global_item_store& global_state, - const items_view_type& main_section, - unsigned tlc_number) + constexpr virtual control + parse_collection_begin([[maybe_unused]] main::collection_type collection, + [[maybe_unused]] const global_item_store& global_state, + [[maybe_unused]] const items_view_type& main_section, + [[maybe_unused]] unsigned tlc_number) { return control::CONTINUE; } @@ -144,9 +145,10 @@ class parser /// @param tlc_number: the Top Level Collection index, where this item is found /// @return CONTINUE to continue the parsing until the next main item, /// or BREAK to terminate it early - constexpr virtual control parse_collection_end(const global_item_store& global_state, - const items_view_type& main_section, - unsigned tlc_number) + constexpr virtual control + parse_collection_end([[maybe_unused]] const global_item_store& global_state, + [[maybe_unused]] const items_view_type& main_section, + [[maybe_unused]] unsigned tlc_number) { return control::CONTINUE; } @@ -160,10 +162,11 @@ class parser /// @param tlc_number: the Top Level Collection index, where this item is found /// @return CONTINUE to continue the parsing until the next main item, /// or BREAK to terminate it early - constexpr virtual control parse_report_data_field(const item_type& main_item, - const global_item_store& global_state, - const items_view_type& main_section, - unsigned tlc_number) + constexpr virtual control + parse_report_data_field([[maybe_unused]] const item_type& main_item, + [[maybe_unused]] const global_item_store& global_state, + [[maybe_unused]] const items_view_type& main_section, + [[maybe_unused]] unsigned tlc_number) { return control::CONTINUE; } diff --git a/hid-rp/hid/report_protocol.hpp b/hid-rp/hid/report_protocol.hpp index d363c7f..1a76ff4 100644 --- a/hid-rp/hid/report_protocol.hpp +++ b/hid-rp/hid/report_protocol.hpp @@ -177,10 +177,9 @@ struct report_protocol_properties } private: - constexpr control parse_report_data_field(const item_type& main_item, - const rdf::global_item_store& global_state, - const items_view_type& main_section, - unsigned tlc_count) override + constexpr control parse_report_data_field( + const item_type& main_item, const rdf::global_item_store& global_state, + [[maybe_unused]] const items_view_type& main_section, unsigned tlc_count) override { using namespace hid::rdf; report::type rtype = main::tag_to_report_type(main_item.main_tag()); diff --git a/hid-rp/sized_unsigned.hpp b/hid-rp/sized_unsigned.hpp index 99580a4..1d9501d 100644 --- a/hid-rp/sized_unsigned.hpp +++ b/hid-rp/sized_unsigned.hpp @@ -11,6 +11,7 @@ #ifndef __SIZED_UNSIGNED_HPP_ #define __SIZED_UNSIGNED_HPP_ +#include #include /// @brief Lookup unsigned integer of matching size