fix some compiler warnings

Signed-off-by: Ivailo Monev <xakepa10@laimg.moc>
This commit is contained in:
Ivailo Monev 2019-05-11 15:59:10 +00:00
parent ec8499c7e2
commit db88a21f69
3 changed files with 5 additions and 4 deletions

View file

@ -213,7 +213,7 @@ PassRefPtr<UString::Rep> Identifier::addSlowCase(JSGlobalData* globalData, UStri
Q_ASSERT(!r->isIdentifier()); Q_ASSERT(!r->isIdentifier());
if (r->size() == 1) { if (r->size() == 1) {
UChar c = r->data()[0]; UChar c = r->data()[0];
if (c <= 0xFF) if (c <= 0xFF) {
r = globalData->smallStrings.singleCharacterStringRep(c); r = globalData->smallStrings.singleCharacterStringRep(c);
if (r->isIdentifier()) { if (r->isIdentifier()) {
#ifndef NDEBUG #ifndef NDEBUG
@ -221,6 +221,7 @@ PassRefPtr<UString::Rep> Identifier::addSlowCase(JSGlobalData* globalData, UStri
#endif #endif
return r; return r;
} }
}
} }
if (!r->size()) { if (!r->size()) {
UString::Rep::empty().hash(); UString::Rep::empty().hash();

View file

@ -885,13 +885,13 @@ static ALWAYS_INLINE void d2b(BigInt& b, U* d, int* e, int* bits)
if ((k = lo0bits(&y))) { if ((k = lo0bits(&y))) {
x[0] = y | (z << (32 - k)); x[0] = y | (z << (32 - k));
z >>= k; z >>= k;
} else } else {
x[0] = y; x[0] = y;
if (z) { if (z) {
b.resize(2); b.resize(2);
x[1] = z; x[1] = z;
} }
}
#ifndef Sudden_Underflow #ifndef Sudden_Underflow
i = b.size(); i = b.size();
#endif #endif

View file

@ -277,7 +277,7 @@ QString QHostInfo::localDomainName()
// using thread-safe version // using thread-safe version
res_state state = static_cast<res_state>(malloc(sizeof(res_state))); res_state state = static_cast<res_state>(malloc(sizeof(res_state)));
Q_CHECK_PTR(state); Q_CHECK_PTR(state);
memset(state, 0, sizeof(res_state)); memset(state, 0, sizeof(*state));
res_ninit(state); res_ninit(state);
QString domainName = QUrl::fromAce(state->defdname); QString domainName = QUrl::fromAce(state->defdname);
if (domainName.isEmpty()) if (domainName.isEmpty())