With Cppcheck 2.9 I get false positive within Qt 5.15 application code:
Condition 'ba.isEmpty()' is always false
For this function:
QImage deserializeImage(const QVariant &data) { if (data.isNull()) return QImage{}; const QByteArray ba{data.toByteArray()}; if (ba.isEmpty()) return QImage{}; return QImage::fromData(ba, "PNG"); }
I've attached example application project.
Thanks for reporting, ticket is here: https://trac.cppcheck.net/ticket/11417
Log in to post a comment.
With Cppcheck 2.9 I get false positive within Qt 5.15 application code:
For this function:
I've attached example application project.
Thanks for reporting, ticket is here: https://trac.cppcheck.net/ticket/11417