On 18 April 2011 11:26, Bart Van Assche <[email protected]> wrote: > Any idea how CppCheck compares to sparse and which one would be suited best > for analyzing Net-SNMP ?
In principle, I don't see why this needs to be either/or. Surely we should aim for the code to pass *any* code checker? Different checkers are likely to pick up on different problems, so if the code is validated against multiple checkers, we're going to end up with a more solid product overall. However, following a quick skim through the first few errors reported by CppCheck, I'm somewhat less convinced about how useful this is likely to be in practise. Most of the error reports I looked at are complaining about missing header files (which are definitely present in the code tree), or suggestions about reducing the scope of variable definitions (which is of limited benefit). It also seems to get confused by the heavy use of #ifdefs within our code. There may well be some useful stuff here (e.g 'lookup_cache' in agent_registry.c), but there seems to be an awful lot of noise. Dave ------------------------------------------------------------------------------ Benefiting from Server Virtualization: Beyond Initial Workload Consolidation -- Increasing the use of server virtualization is a top priority.Virtualization can reduce costs, simplify management, and improve application availability and disaster protection. Learn more about boosting the value of server virtualization. http://p.sf.net/sfu/vmware-sfdev2dev _______________________________________________ Net-snmp-coders mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/net-snmp-coders
