Hi,
I've ran clang static analyser on SVN latest and got the following:
Bug Summary
Bug Type | Quantity | Display? |
All Bugs | 2769 | |
Dead store |
|
Dead assignment | 1692 | |
Dead increment | 998 | |
Dead initialization | 25 | |
Dead nested assignment | 32 | |
Logic errors |
|
Null dereference | 21 | |
Use of uninitialized value | 1 | |
Obviously, there's little chance I can fix all of them. I can try fix a few from the dissectors I'm familiar with, though.
Some (most of the dead) might/probably are removed by current generation compiler, so aren't so important to fix, although it'd be nice to.
The rest may be a bit more important to fix.
Example of such bug (from packet-bgp.c, which should REALLY be refactored to functions!):
2235 |
ti = proto_tree_add_text(subtree2, tvb, o + i + aoff, tlen, |
2236 | "Cluster list: %s", cluster_list_emstr->str); |
|
15 | Dereference of null pointer (cluster_list_emstr)
|