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>
This commit is contained in:
parent
6adfca1acb
commit
6381c807e5
@ -221,7 +221,7 @@ QLibraryInfo::QLibraryInfo()
|
|||||||
QString
|
QString
|
||||||
QLibraryInfo::licensee()
|
QLibraryInfo::licensee()
|
||||||
{
|
{
|
||||||
const char *str = QT_CONFIGURE_LICENSEE;
|
const char * volatile str = QT_CONFIGURE_LICENSEE;
|
||||||
return QString::fromLocal8Bit(str);
|
return QString::fromLocal8Bit(str);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -234,7 +234,7 @@ QLibraryInfo::licensee()
|
|||||||
QString
|
QString
|
||||||
QLibraryInfo::licensedProducts()
|
QLibraryInfo::licensedProducts()
|
||||||
{
|
{
|
||||||
const char *str = QT_CONFIGURE_LICENSED_PRODUCTS;
|
const char * volatile str = QT_CONFIGURE_LICENSED_PRODUCTS;
|
||||||
return QString::fromLatin1(str);
|
return QString::fromLatin1(str);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user