Commit 219e611e authored by Laurent Montel's avatar Laurent Montel 😁

Remove some warnings

parent 4fbb3e13
......@@ -72,8 +72,8 @@ QByteArray encodeRFC2047String(const QString &src, const QByteArray &charset,
return encoded8Bit;
}
uint encoded8BitLength = encoded8Bit.length();
for (unsigned int i = 0; i < encoded8BitLength; i++) {
int encoded8BitLength = encoded8Bit.length();
for (int i = 0; i < encoded8BitLength; i++) {
if (encoded8Bit[i] == ' ') { // encoding starts at word boundaries
start = i + 1;
}
......@@ -263,7 +263,7 @@ QString decodeRFC2231String(const QByteArray &str, QByteArray &usedCS, const QBy
char ch, ch2;
p = 0;
while (p < (int)st.length()) {
while (p < st.length()) {
if (st.at(p) == 37) {
// Only try to decode the percent-encoded character if the percent sign
// is really followed by two other characters, see testcase at bug 163024
......
......@@ -778,7 +778,7 @@ Content *KMime::Content::content(const ContentIndex &index) const
}
ContentIndex idx = index;
unsigned int i = idx.pop() - 1; // one-based -> zero-based index
if (i < (unsigned int)d_ptr->contents().size()) {
if (i < static_cast<unsigned int>(d_ptr->contents().size())) {
return d_ptr->contents().at(i)->content(idx);
} else {
return nullptr;
......
......@@ -140,22 +140,16 @@ QString DateFormatter::dateString(time_t t, const QString &lang, bool shortForma
switch (d->mFormat) {
case Fancy:
return d->fancy(t);
break;
case Localized:
return d->localized(t, shortFormat, lang);
break;
case CTime:
return d->cTime(t);
break;
case Iso:
return d->isoDate(t);
break;
case Rfc:
return d->rfc2822(t);
break;
case Custom:
return d->custom(t);
break;
}
return QString();
}
......
......@@ -298,7 +298,7 @@ QString descriptionFor(DispositionType d,
}
}
qWarning() << "KMime::MDN::descriptionFor(): No such disposition type:"
<< (int)d;
<< static_cast<int>(d);
return QString();
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment