Fix unused function warnings for conditionally used functions
Change-Id: Ied23c571b949abef1816914986f19b14aca3d2f3
This commit is contained in:
1 parent
7124974148
commit
c56a82fd05
4 files changed
+30
-16
No files matched your search
@@ -1440,12 +1440,6 @@ Options::setPerBuildInfo(
|
||||
}
|
||||
|
||||
|
||||
static inline bool isFullPath(const std::string &path)
|
||||
{
|
||||
size_t found = path.find(":");
|
||||
return found != std::string::npos;
|
||||
}
|
||||
|
||||
// HashString - Hash function for strings.
|
||||
// This is the Bernstein hash function.
|
||||
static inline unsigned HashString(std::string Str, unsigned Result = 0)
|
||||
@@ -1475,19 +1469,19 @@ static void splitFileName(const std::string &fileName, std::string &path, std::s
|
||||
}
|
||||
}
|
||||
|
||||
#ifdef _WIN32
|
||||
static inline bool isFullPath(const std::string &path)
|
||||
{
|
||||
size_t found = path.find(":");
|
||||
return found != std::string::npos;
|
||||
}
|
||||
|
||||
static std::string getValidDumpPath(const std::string &path)
|
||||
{
|
||||
if (path.empty()) {
|
||||
return path;
|
||||
}
|
||||
|
||||
#ifdef __linux__
|
||||
const std::string curPath = path + ".";
|
||||
long pathname_max = pathconf(curPath.c_str(), _PC_PATH_MAX);
|
||||
assert(pathname_max != -1 && path.size() < static_cast<unsigned long>(pathname_max));
|
||||
return path;
|
||||
#endif
|
||||
#ifdef _WIN32
|
||||
std::string validPath;
|
||||
unsigned long pathname_max = _MAX_PATH;
|
||||
if (path.size() > pathname_max) {
|
||||
@@ -1504,9 +1498,24 @@ static std::string getValidDumpPath(const std::string &path)
|
||||
} else
|
||||
validPath = path;
|
||||
return validPath;
|
||||
#endif
|
||||
}
|
||||
|
||||
#else
|
||||
|
||||
static std::string getValidDumpPath(const std::string &path)
|
||||
{
|
||||
if (path.empty()) {
|
||||
return path;
|
||||
}
|
||||
|
||||
const std::string curPath = path + ".";
|
||||
long pathname_max = pathconf(curPath.c_str(), _PC_PATH_MAX);
|
||||
assert(pathname_max != -1 && path.size() < static_cast<unsigned long>(pathname_max));
|
||||
return path;
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
static std::string getValidDumpBaseName(const std::string &path, const std::string &file,
|
||||
long basename_max, const std::string &ext)
|
||||
{
|
||||
|
||||
Reference in new issue
Block a user