meson: Address warnings for switching autoconf to meson
This commit addresses the compilation warnings when switching autoconf
to meson.
Tested: Build passes with CIT and "ninja -C build".
Change-Id: Ieda04b856f4fd24de867c3eaee8b9c4a9b333aaf
Signed-off-by: Jagpal Singh Gill <paligill@gmail.com>
diff --git a/settings_main.cpp b/settings_main.cpp
index 78a0ebe..abc28c5 100644
--- a/settings_main.cpp
+++ b/settings_main.cpp
@@ -5,7 +5,7 @@
#include <sdbusplus/bus.hpp>
#include <sdbusplus/server/manager.hpp>
-int main(int argc, char* argv[])
+int main([[maybe_unused]] int argc, [[maybe_unused]] char* argv[])
{
auto bus = sdbusplus::bus::new_default();
diff --git a/settings_manager.mako.hpp b/settings_manager.mako.hpp
index 6f14612..4815ee5 100644
--- a/settings_manager.mako.hpp
+++ b/settings_manager.mako.hpp
@@ -178,7 +178,11 @@
}
% elif (validators[propName][0] == 'range'):
<% lowhigh = re.split('\.\.', validators[propName][1]) %>\
+ % if lowhigh[0] == '0':
+ if (value <= ${lowhigh[1]})
+ % else:
if ((value <= ${lowhigh[1]}) && (value >= ${lowhigh[0]}))
+ % endif
{
matched = true;
}
@@ -203,7 +207,7 @@
template<class Archive>
void save(Archive& a,
const Impl& setting,
- const std::uint32_t version)
+ [[maybe_unused]] const std::uint32_t version)
{
<%
props = []
@@ -221,7 +225,7 @@
template<class Archive>
void load(Archive& a,
Impl& setting,
- const std::uint32_t version)
+ [[maybe_unused]] const std::uint32_t version)
{
<% props = [] %>\
% for index, item in enumerate(settingsDict[object]):