Fix warning: helper functions are only used on some platforms

Tag them as [[maybe_unused]] to silence compiler on platforms where they
are not used.

Change-Id: I12243c0409c66863617f073f968e50f913c58a67
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
bb10
Volker Hilsheimer 2020-10-15 17:29:32 +02:00
parent 215594d664
commit 862bdcd09c
1 changed files with 2 additions and 2 deletions

View File

@ -480,13 +480,13 @@ static QString fallbackXdgRuntimeDir()
}
#endif
static QString updateRuntimeDir(const QString &path)
[[maybe_unused]] static QString updateRuntimeDir(const QString &path)
{
qputenv("XDG_RUNTIME_DIR", QFile::encodeName(path));
return path;
}
static void clearRuntimeDir()
[[maybe_unused]] static void clearRuntimeDir()
{
qunsetenv("XDG_RUNTIME_DIR");
#ifdef Q_XDG_PLATFORM