Resolve Meson issues
This commit includes fixes in the repo:
1. Errors that meson identified
2. Formatting changes
Signed-off-by: Ratan Gupta <ratankgupta31@gmail.com>
Change-Id: I4f57abb2236205fe6fc04292a00a270c816ba965
diff --git a/mainapp.cpp b/mainapp.cpp
index e08da61..e8a1f00 100644
--- a/mainapp.cpp
+++ b/mainapp.cpp
@@ -22,7 +22,7 @@
// D-Bus root for user manager
constexpr auto USER_MANAGER_ROOT = "/xyz/openbmc_project/user";
-int main(int argc, char** argv)
+int main(int /*argc*/, char** /*argv*/)
{
auto bus = sdbusplus::bus::new_default();
sdbusplus::server::manager::manager objManager(bus, USER_MANAGER_ROOT);
diff --git a/phosphor-ldap-config/ldap_config.cpp b/phosphor-ldap-config/ldap_config.cpp
index 599abaf..57654a8 100644
--- a/phosphor-ldap-config/ldap_config.cpp
+++ b/phosphor-ldap-config/ldap_config.cpp
@@ -137,7 +137,7 @@
configPersistPath += "/config";
}
-void Config::certificateInstalled(sdbusplus::message::message& msg)
+void Config::certificateInstalled(sdbusplus::message::message& /*msg*/)
{
try
{
@@ -531,7 +531,7 @@
return val;
}
-ConfigIface::Type Config::ldapType(ConfigIface::Type value)
+ConfigIface::Type Config::ldapType(ConfigIface::Type /*value*/)
{
elog<NotAllowed>(NotAllowedArgument::REASON("ReadOnly Property"));
return ldapType();
@@ -640,7 +640,7 @@
}
template <class Archive>
-void Config::save(Archive& archive, const std::uint32_t version) const
+void Config::save(Archive& archive, const std::uint32_t /*version*/) const
{
archive(this->enabled());
archive(ldapServerURI());
@@ -653,7 +653,7 @@
}
template <class Archive>
-void Config::load(Archive& archive, const std::uint32_t version)
+void Config::load(Archive& archive, const std::uint32_t /*version*/)
{
bool bVal;
archive(bVal);
diff --git a/phosphor-ldap-config/ldap_mapper_serialize.cpp b/phosphor-ldap-config/ldap_mapper_serialize.cpp
index 9be8839..66cea37 100644
--- a/phosphor-ldap-config/ldap_mapper_serialize.cpp
+++ b/phosphor-ldap-config/ldap_mapper_serialize.cpp
@@ -30,7 +30,7 @@
*/
template <class Archive>
void save(Archive& archive, const LDAPMapperEntry& entry,
- const std::uint32_t version)
+ const std::uint32_t /*version*/)
{
archive(entry.groupName(), entry.privilege());
}
@@ -44,7 +44,8 @@
* across code levels
*/
template <class Archive>
-void load(Archive& archive, LDAPMapperEntry& entry, const std::uint32_t version)
+void load(Archive& archive, LDAPMapperEntry& entry,
+ const std::uint32_t /*version*/)
{
std::string groupName{};
std::string privilege{};
diff --git a/phosphor-ldap-config/main.cpp b/phosphor-ldap-config/main.cpp
index 041609b..bd65da4 100644
--- a/phosphor-ldap-config/main.cpp
+++ b/phosphor-ldap-config/main.cpp
@@ -9,7 +9,7 @@
#include <filesystem>
-int main(int argc, char* argv[])
+int main(int /*argc*/, char** /*argv*/)
{
using namespace phosphor::logging;
using namespace sdbusplus::xyz::openbmc_project::Common::Error;
diff --git a/phosphor-ldap-mapper/ldap_mapper_serialize.cpp b/phosphor-ldap-mapper/ldap_mapper_serialize.cpp
index 728b3fa..c167a69 100644
--- a/phosphor-ldap-mapper/ldap_mapper_serialize.cpp
+++ b/phosphor-ldap-mapper/ldap_mapper_serialize.cpp
@@ -31,7 +31,7 @@
*/
template <class Archive>
void save(Archive& archive, const LDAPMapperEntry& entry,
- const std::uint32_t version)
+ const std::uint32_t /*version*/)
{
archive(entry.groupName(), entry.privilege());
}
@@ -45,7 +45,8 @@
* across code levels
*/
template <class Archive>
-void load(Archive& archive, LDAPMapperEntry& entry, const std::uint32_t version)
+void load(Archive& archive, LDAPMapperEntry& entry,
+ const std::uint32_t /*version*/)
{
std::string groupName{};
std::string privilege{};
diff --git a/phosphor-ldap-mapper/main.cpp b/phosphor-ldap-mapper/main.cpp
index 0ccf85c..60109d4 100644
--- a/phosphor-ldap-mapper/main.cpp
+++ b/phosphor-ldap-mapper/main.cpp
@@ -5,7 +5,7 @@
#include <filesystem>
#include <string>
-int main(int argc, char** argv)
+int main(int /*argc*/, char** /*argv*/)
{
auto bus = sdbusplus::bus::new_default();
sdbusplus::server::manager::manager objManager(
diff --git a/test/mock_user_mgr.hpp b/test/mock_user_mgr.hpp
index ec47909..70d696c 100644
--- a/test/mock_user_mgr.hpp
+++ b/test/mock_user_mgr.hpp
@@ -12,8 +12,7 @@
class MockManager : public UserMgr
{
public:
- MockManager(sdbusplus::bus::bus& bus, const char* path) :
- UserMgr(bus, objpath)
+ MockManager(sdbusplus::bus::bus& bus, const char* path) : UserMgr(bus, path)
{}
MOCK_METHOD1(getLdapGroupName, std::string(const std::string& userName));