Fix assorted memory and static analysis errors

This commit is contained in:
Felipe Zimmerle
2017-01-31 17:15:31 -03:00
committed by Felipe Zimmerle
parent 8d0583eda4
commit e95efa05cc
62 changed files with 209 additions and 189 deletions

View File

@@ -97,8 +97,10 @@ std::string const UniqueId::machineName() {
return std::string(machine_name);
#if defined(HAVE_SYS_UTSNAME_H) || defined(WIN32)
failed:
return std::string("");
#endif
}
std::string const UniqueId::ethernetMacAddress() {
@@ -221,8 +223,10 @@ std::string const UniqueId::ethernetMacAddress() {
end:
return std::string(reinterpret_cast<const char *>(mac));
#if defined(__linux__) || defined(__gnu_linux__) || defined(DARWIN) || defined(WIN32)
failed:
return std::string("");
#endif
}