|
|
Subscribe / Log in / New account

Smatch: pluggable static analysis for C

Smatch: pluggable static analysis for C

Posted Jul 1, 2016 14:25 UTC (Fri) by error27 (subscriber, #8346)
In reply to: Smatch: pluggable static analysis for C by mstefani
Parent article: Smatch: pluggable static analysis for C

I hadn't testing wine for some time.

I have pushed an update so you don't need to do Neil's -I/usr/include/x86_64-linux-gnu/ work around that he mentions in the other comment. Also I changed it to ignore _Pragma() instead of dying. There are still one or two files that don't compile because they use the tools/winegcc/winegcc wrapper instead of regular gcc and I didn't investigate how to deal with that.

The main thing though was that it wasn't ignoring the ok() macro and the list of no return functions was out of date. I also updated the smatch_scripts/ directory to take a -p=<project> argument. The thing which I haven't managed to do yet is to make the cross function db work properly.

CHECK="~/progs/smatch/devel/smatch --file-output --full-path -p=wine" \
make CC="~/progs/smatch/devel/cgcc"
find -name \*.c.smatch -exec cat \{\} \; > smatch_warns.txt

You could pass a -j8 or whatever to the make to speed things up.

The warnings are still pretty low quality compared to the kernel because I've massaged Smatch for the kernel's quirks. :/ The kernel has a pretty uniform style so there are some issues I never noticed until now.


to post comments


Copyright © 2025, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds