summaryrefslogtreecommitdiffstats
path: root/src/corelib/global/qlibraryinfo.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/corelib/global/qlibraryinfo.cpp')
-rw-r--r--src/corelib/global/qlibraryinfo.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/corelib/global/qlibraryinfo.cpp b/src/corelib/global/qlibraryinfo.cpp
index 276741c9fb..1ebffd9f49 100644
--- a/src/corelib/global/qlibraryinfo.cpp
+++ b/src/corelib/global/qlibraryinfo.cpp
@@ -745,6 +745,11 @@ QLibraryInfo::rawLocation(LibraryLocation loc, PathGroup group)
#ifndef QT_BUILD_QMAKE_BOOTSTRAP
if (!fromConf) {
+ // "volatile" here is a hack to prevent compilers from doing a
+ // compile-time strlen() on "path". The issue is that Qt installers
+ // will binary-patch the Qt installation paths -- in such scenarios, Qt
+ // will be built with a dummy path, thus the compile-time result of
+ // strlen is meaningless.
const char * volatile path = 0;
if (loc == PrefixPath) {
path = getPrefix(