tech-userlevel archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: KASSERT and clang static analyzer



I looked at the picture, and it seems to me it is doing the same thing that it does for any other "if ()" condition. Look just a little bit further down and you'll see the same "assumption" on an if that isn't buried inside a macro.

In short, there's nothing wrong, nothing to investigate.



On Tue, 18 Apr 2017, Kamil Rytarowski wrote:

On 18.04.2017 11:39, coypu%sdf.org@localhost wrote:
Hi,

I'm trying clang static analyzer.
It seems to assume that KASSERT(a != 0) => test what happens if a == 0 in the rest of the function
any idea how to convince it to stop doing that?

example output: http://i.imgur.com/AqTm9mq.png
I'm building kernel with 'scan-build make -j20'

Thanks.


Does disabling the diagnostics in the kernel help?



+------------------+--------------------------+----------------------------+
| Paul Goyette     | PGP Key fingerprint:     | E-mail addresses:          |
| (Retired)        | FA29 0E3B 35AF E8AE 6651 | paul at whooppee dot com   |
| Kernel Developer | 0786 F758 55DE 53BA 7731 | pgoyette at netbsd dot org |
+------------------+--------------------------+----------------------------+


Home | Main Index | Thread Index | Old Index