diff options
author | Kai Koehne <kai.koehne@digia.com> | 2013-10-28 12:48:15 +0100 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2013-11-06 08:55:45 +0100 |
commit | 6381c807e550fa6f1f7425dc800dbf8be121ab82 (patch) | |
tree | 0faa8ee5750e32879509863c277fef93760a2097 /src/corelib/global | |
parent | 6adfca1acbe226fe49bdd90c91ac6ea74d4d6af9 (diff) |
Force length fo licensee literals to be computed at runtime
Prevent compilers from computing strlen() at compile time by
passing a volatile pointer.
Task-number: QTBUG-34261
Change-Id: I5e5e80181024d57496907918d2a43d7c83841082
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Diffstat (limited to 'src/corelib/global')
-rw-r--r-- | src/corelib/global/qlibraryinfo.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/corelib/global/qlibraryinfo.cpp b/src/corelib/global/qlibraryinfo.cpp index 33d7b71cff..1c3b09f602 100644 --- a/src/corelib/global/qlibraryinfo.cpp +++ b/src/corelib/global/qlibraryinfo.cpp @@ -221,7 +221,7 @@ QLibraryInfo::QLibraryInfo() QString QLibraryInfo::licensee() { - const char *str = QT_CONFIGURE_LICENSEE; + const char * volatile str = QT_CONFIGURE_LICENSEE; return QString::fromLocal8Bit(str); } @@ -234,7 +234,7 @@ QLibraryInfo::licensee() QString QLibraryInfo::licensedProducts() { - const char *str = QT_CONFIGURE_LICENSED_PRODUCTS; + const char * volatile str = QT_CONFIGURE_LICENSED_PRODUCTS; return QString::fromLatin1(str); } |