build: fix -Wmissing-prototype
This helps make the author's original intent clear. Tested by building
and running the unit tests with clang.
Change-Id: If0231ec5634adad0b61e7fcff8ec1e5bcbbb92c1
Signed-off-by: Brad Bishop <bradbish@qti.qualcomm.com>
diff --git a/src/test/handler.cpp b/src/test/handler.cpp
index a295fbc..b64b798 100644
--- a/src/test/handler.cpp
+++ b/src/test/handler.cpp
@@ -223,7 +223,7 @@
sdbusplus::xyz::openbmc_project::Common::Error::ResourceNotFound);
}
-void verifySubtree(std::span<InterfaceMapType::value_type> subtree)
+static void verifySubtree(std::span<InterfaceMapType::value_type> subtree)
{
ASSERT_EQ(subtree.size(), 2);
ConnectionNames connection = subtree[0].second;
diff --git a/src/test/interfaces_added.cpp b/src/test/interfaces_added.cpp
index 7117611..c60298e 100644
--- a/src/test/interfaces_added.cpp
+++ b/src/test/interfaces_added.cpp
@@ -15,8 +15,8 @@
// This is the data structure that comes in via the InterfacesAdded
// signal
-InterfacesAdded createInterfacesAdded(const std::string& interface,
- const std::string& property)
+static InterfacesAdded createInterfacesAdded(const std::string& interface,
+ const std::string& property)
{
std::vector<Association> associations = {
{"inventory", "error",
diff --git a/src/test/util/association_objects.hpp b/src/test/util/association_objects.hpp
index e9fd016..f7c17a2 100644
--- a/src/test/util/association_objects.hpp
+++ b/src/test/util/association_objects.hpp
@@ -10,7 +10,7 @@
const std::string extraEndpoint = "/xyz/openbmc_project/different/endpoint";
// Create a default AssociationOwnersType object
-AssociationOwnersType createDefaultOwnerAssociation()
+inline AssociationOwnersType createDefaultOwnerAssociation()
{
AssociationPaths assocPathMap = {{defaultFwdPath, {defaultEndpoint}},
{defaultRevPath, {defaultSourcePath}}};
@@ -21,7 +21,7 @@
}
// Create a default AssociationInterfaces object
-AssociationInterfaces createDefaultInterfaceAssociation(
+inline AssociationInterfaces createDefaultInterfaceAssociation(
sdbusplus::asio::object_server* server)
{
AssociationInterfaces interfaceAssoc;
@@ -40,7 +40,8 @@
}
// Just add an extra endpoint to the first association
-void addEndpointToInterfaceAssociation(AssociationInterfaces& interfaceAssoc)
+inline void addEndpointToInterfaceAssociation(
+ AssociationInterfaces& interfaceAssoc)
{
auto iface = interfaceAssoc[defaultFwdPath];
auto endpoints = std::get<endpointsPos>(iface);
@@ -48,9 +49,9 @@
}
// Create a default interfaceMapType with input values
-InterfaceMapType createInterfaceMap(const std::string& path,
- const std::string& connectionName,
- const InterfaceNames& interfaceNames)
+inline InterfaceMapType createInterfaceMap(const std::string& path,
+ const std::string& connectionName,
+ const InterfaceNames& interfaceNames)
{
ConnectionNames connectionMap{{connectionName, interfaceNames}};
InterfaceMapType interfaceMap{{path, connectionMap}};
@@ -60,7 +61,7 @@
// Create a default interfaceMapType with 2 entries with the same
// owner.
-InterfaceMapType createDefaultInterfaceMap()
+inline InterfaceMapType createDefaultInterfaceMap()
{
InterfaceMapType interfaceMap = {
{defaultSourcePath, {{defaultDbusSvc, {"a"}}}},
diff --git a/src/test/util/debug_output.hpp b/src/test/util/debug_output.hpp
index aff87d5..0532d55 100644
--- a/src/test/util/debug_output.hpp
+++ b/src/test/util/debug_output.hpp
@@ -4,7 +4,7 @@
// Some debug functions for dumping out the main data structures in objmgr
-void dumpAssociationOwnersType(AssociationOwnersType& assocOwners)
+inline void dumpAssociationOwnersType(AssociationOwnersType& assocOwners)
{
using namespace std;
cout << "##### AssociationOwnersType #####\n";
@@ -31,7 +31,7 @@
}
}
-void dumpAssociationInterfaces(AssociationInterfaces& assocInterfaces)
+inline void dumpAssociationInterfaces(AssociationInterfaces& assocInterfaces)
{
using namespace std;
cout << "##### AssociationInterfaces #####\n";
@@ -49,7 +49,7 @@
}
}
-void dumpInterfaceMapType(InterfaceMapType& intfMap)
+inline void dumpInterfaceMapType(InterfaceMapType& intfMap)
{
using namespace std;
cout << "##### interfaceMapType #####\n";