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/main.cpp b/src/main.cpp
index 16493b1..b5dc37f 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -22,9 +22,10 @@
static AssociationMaps associationMaps;
-void updateOwners(sdbusplus::asio::connection* conn,
- boost::container::flat_map<std::string, std::string>& owners,
- const std::string& newObject)
+static void updateOwners(
+ sdbusplus::asio::connection* conn,
+ boost::container::flat_map<std::string, std::string>& owners,
+ const std::string& newObject)
{
if (newObject.starts_with(":"))
{
@@ -45,8 +46,8 @@
newObject);
}
-void sendIntrospectionCompleteSignal(sdbusplus::asio::connection* systemBus,
- const std::string& processName)
+static void sendIntrospectionCompleteSignal(
+ sdbusplus::asio::connection* systemBus, const std::string& processName)
{
// TODO(ed) This signal doesn't get exposed properly in the
// introspect right now. Find out how to register signals in
@@ -129,12 +130,12 @@
#endif
};
-void doAssociations(boost::asio::io_context& io,
- sdbusplus::asio::connection* systemBus,
- InterfaceMapType& interfaceMap,
- sdbusplus::asio::object_server& objectServer,
- const std::string& processName, const std::string& path,
- int timeoutRetries = 0)
+static void doAssociations(
+ boost::asio::io_context& io, sdbusplus::asio::connection* systemBus,
+ InterfaceMapType& interfaceMap,
+ sdbusplus::asio::object_server& objectServer,
+ const std::string& processName, const std::string& path,
+ int timeoutRetries = 0)
{
constexpr int maxTimeoutRetries = 3;
systemBus->async_method_call(
@@ -162,12 +163,12 @@
assocDefsInterface, assocDefsProperty);
}
-void doIntrospect(boost::asio::io_context& io,
- sdbusplus::asio::connection* systemBus,
- const std::shared_ptr<InProgressIntrospect>& transaction,
- InterfaceMapType& interfaceMap,
- sdbusplus::asio::object_server& objectServer,
- const std::string& path, int timeoutRetries = 0)
+static void doIntrospect(
+ boost::asio::io_context& io, sdbusplus::asio::connection* systemBus,
+ const std::shared_ptr<InProgressIntrospect>& transaction,
+ InterfaceMapType& interfaceMap,
+ sdbusplus::asio::object_server& objectServer, const std::string& path,
+ int timeoutRetries = 0)
{
constexpr int maxTimeoutRetries = 3;
systemBus->async_method_call(
@@ -254,7 +255,7 @@
"Introspect");
}
-void startNewIntrospect(
+static void startNewIntrospect(
sdbusplus::asio::connection* systemBus, boost::asio::io_context& io,
InterfaceMapType& interfaceMap, const std::string& processName,
AssociationMaps& assocMaps,
@@ -280,7 +281,7 @@
}
}
-void doListNames(
+static void doListNames(
boost::asio::io_context& io, InterfaceMapType& interfaceMap,
sdbusplus::asio::connection* systemBus,
boost::container::flat_map<std::string, std::string>& nameOwners,
@@ -327,9 +328,9 @@
// - Means D-Bus created these, not application code,
// with the Properties, Introspectable, and Peer ifaces
// 2) Have no other child for this owner
-void removeUnneededParents(const std::string& objectPath,
- const std::string& owner,
- InterfaceMapType& interfaceMap)
+static void removeUnneededParents(const std::string& objectPath,
+ const std::string& owner,
+ InterfaceMapType& interfaceMap)
{
auto parent = objectPath;