Add an else clause that clears the return value.
This avoids several warnings with the GHS toolchain, in the form: warning #111-D: statement is unreachable This is because the sizeof() equality test is statically determined, but the following code is not discarded automatically. It is when using an explicit else clause. Change-Id: Ic0584aafc72f70badcf5285ab635f9d99eac161a Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
This commit is contained in:
parent
7cff3e807e
commit
dff4120a37
@ -958,8 +958,9 @@ inline int QString::toWCharArray(wchar_t *array) const
|
||||
if (sizeof(wchar_t) == sizeof(QChar)) {
|
||||
memcpy(array, d->data(), sizeof(QChar) * size());
|
||||
return size();
|
||||
} else {
|
||||
return toUcs4_helper(d->data(), size(), reinterpret_cast<uint *>(array));
|
||||
}
|
||||
return toUcs4_helper(d->data(), size(), reinterpret_cast<uint *>(array));
|
||||
}
|
||||
|
||||
QT_WARNING_POP
|
||||
|
Loading…
Reference in New Issue
Block a user