From 862bdcd09cef3301d5681c9f7c35783a0f3fa35d Mon Sep 17 00:00:00 2001 From: Volker Hilsheimer Date: Thu, 15 Oct 2020 17:29:32 +0200 Subject: Fix warning: helper functions are only used on some platforms MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Tag them as [[maybe_unused]] to silence compiler on platforms where they are not used. Change-Id: I12243c0409c66863617f073f968e50f913c58a67 Reviewed-by: Tor Arne Vestbø --- tests/auto/corelib/io/qstandardpaths/tst_qstandardpaths.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'tests/auto/corelib/io/qstandardpaths') diff --git a/tests/auto/corelib/io/qstandardpaths/tst_qstandardpaths.cpp b/tests/auto/corelib/io/qstandardpaths/tst_qstandardpaths.cpp index 16b4fb4423..bbb5b10eb7 100644 --- a/tests/auto/corelib/io/qstandardpaths/tst_qstandardpaths.cpp +++ b/tests/auto/corelib/io/qstandardpaths/tst_qstandardpaths.cpp @@ -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 -- cgit v1.2.3