Initialize out-variable
QMetaType::convert does have code paths where nothing is written to the 'to' out-variable. Those code paths shouldn't run in this particular case, but it's good practice to initialize out-variables anyway. Fixes static analyzer warning 1453920f5abe1e30471eca6aa01d22d1. Change-Id: I6f6d1044759866c405e61cb51147ca0490c4f3a4 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
This commit is contained in:
parent
3bf0a40a3b
commit
7b3883614d
@ -1835,7 +1835,7 @@ static bool convertFromEnum(QMetaType fromType, const void *from, QMetaType toTy
|
||||
static bool convertToEnum(QMetaType fromType, const void *from, QMetaType toType, void *to)
|
||||
{
|
||||
int fromTypeId = fromType.id();
|
||||
qlonglong value;
|
||||
qlonglong value = -1;
|
||||
bool ok = false;
|
||||
#ifndef QT_NO_QOBJECT
|
||||
if (fromTypeId == QMetaType::QString || fromTypeId == QMetaType::QByteArray) {
|
||||
|
Loading…
Reference in New Issue
Block a user