[Qt-creator] Building QtCreator with Meson and results of static analysis

Jussi Pakkanen jpakkane at gmail.com
Sat May 17 22:17:56 CEST 2014


On Sat, May 17, 2014 at 10:40 PM, André Pönitz <apoenitz at t-online.de> wrote:


> > - most false positives are cause by QTC_CHECK not marking its error
> > function with QNORETURN
>
> But... QTC_CHECK always returns. Why should it have QNORETURN?


Ah, my bad, I remembered incorrectly that it would call qFatal. It instead
calls qDebug. But in this case the reported issues can be considered valid.
The code invokes the given pointer even after noticing it is null.

> For the third issue:
>
>   d->doc = doc;
>
>   if (d->doc) {
>
>        Taking true branch
>
>        [...]
>        doc->documentLayout()));
>
>        Called C++ object pointer is null
>
> "Taking true branch" means both d->doc is not null. Since it was just
> copied from 'doc', 'doc' is non-null either.

This looks like a bug or potential false positive.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.qt-project.org/pipermail/qt-creator/attachments/20140517/6cbb7523/attachment.html>


More information about the Qt-creator mailing list