time-config: fix warning for missing return in non-void function
Change-Id: Id2852a3a4dd48a59a37b847d97cc5de158335a82
Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
diff --git a/time-config.cpp b/time-config.cpp
index 48bcbd4..b46ff54 100644
--- a/time-config.cpp
+++ b/time-config.cpp
@@ -3,6 +3,7 @@
#include <iostream>
#include <memory>
#include <mapper.h>
+#include <cassert>
#include "time-manager.hpp"
std::map<std::string, TimeConfig::FUNCTOR> TimeConfig::iv_TimeParams = {
@@ -47,7 +48,7 @@
}
// Accepts a timeMode enum and returns it's string value
-const char* TimeConfig::modeStr(const TimeConfig::timeModes timeMode)
+const char* TimeConfig::modeStr(TimeConfig::timeModes timeMode)
{
switch(timeMode)
{
@@ -60,6 +61,9 @@
return "MANUAL";
}
}
+
+ assert(false);
+ return nullptr;
}
// Given a owner string, returns it's equivalent owner enum
@@ -84,7 +88,7 @@
}
// Accepts a timeOwner enum and returns it's string value
-const char* TimeConfig::ownerStr(const timeOwners timeOwner)
+const char* TimeConfig::ownerStr(timeOwners timeOwner)
{
switch(timeOwner)
{
@@ -105,6 +109,9 @@
return "BOTH";
}
}
+
+ assert(false);
+ return nullptr;
}
// Returns the busname that hosts objPath