BIND 10 #1193: New cppcheck adds new recommendations

BIND 10 Development do-not-reply at isc.org
Wed Aug 24 10:30:24 UTC 2011


#1193: New cppcheck adds new recommendations
-------------------------------------+-------------------------------------
            Reporter:  vorner        |                        Owner:
                Type:  defect        |                       Status:  new
            Priority:  major         |                    Milestone:  New
           Component:  Unclassified  |  Tasks
           Sensitive:  0             |                     Keywords:
         Sub-Project:  DNS           |              Defect Severity:  N/A
Estimated Difficulty:  0             |  Feature Depending on Ticket:
         Total Hours:  0             |          Add Hours to Ticket:  0
                                     |                    Internal?:  0
-------------------------------------+-------------------------------------
 When running cppcheck locally, I discovered it lists bunch of errors. It
 turns out that I have version 1.49 and the buildbot has 1.47. Jeremy said
 he would upgrade it. But the issues should be solved first.

 Here's what I get. Some of them might be tests (for example Same
 expression on both sides) and should be ignored, but some look like real
 issues (the uninitialized values):

 {{{

 src/lib/datasrc/tests/database_unittest.cc:673: check_fail: Possible
 inefficient checking for 'expected_rdatas' emptiness.
 (performance,stlSize)
 src/lib/datasrc/tests/database_unittest.cc:678: check_fail: Possible
 inefficient checking for 'expected_sig_rdatas' emptiness.
 (performance,stlSize)
 src/lib/dns/tests/name_unittest.cc:546: check_fail: Same expression on
 both sides of '<='. (style,duplicateExpression)
 src/lib/dns/tests/name_unittest.cc:558: check_fail: Same expression on
 both sides of '<='. (style,duplicateExpression)
 src/lib/dns/tests/name_unittest.cc:569: check_fail: Same expression on
 both sides of '<'. (style,duplicateExpression)
 src/lib/dns/tests/name_unittest.cc:580: check_fail: Same expression on
 both sides of '<'. (style,duplicateExpression)
 src/lib/dns/tests/name_unittest.cc:293: check_fail: Unmatched suppression:
 selfAssignment (information,unmatchedSuppression)
 src/lib/dns/tests/rdata_unittest.cc:228: check_fail: Unmatched
 suppression: selfAssignment (information,unmatchedSuppression)
 src/lib/dns/tests/rrttl_unittest.cc:141: check_fail: Same expression on
 both sides of '<='. (style,duplicateExpression)
 src/lib/dns/tests/rrttl_unittest.cc:153: check_fail: Same expression on
 both sides of '<='. (style,duplicateExpression)
 src/lib/dns/tests/rrttl_unittest.cc:164: check_fail: Same expression on
 both sides of '<'. (style,duplicateExpression)
 src/lib/dns/tests/rrttl_unittest.cc:175: check_fail: Same expression on
 both sides of '<'. (style,duplicateExpression)
 src/lib/dns/tests/tsigkey_unittest.cc:137: check_fail: Unmatched
 suppression: selfAssignment (information,unmatchedSuppression)
 src/lib/nsas/glue_hints.cc:89: check_fail: Possible inefficient checking
 for 'addresses_v4' emptiness. (performance,stlSize)
 src/lib/nsas/glue_hints.cc:90: check_fail: Possible inefficient checking
 for 'addresses_v6' emptiness. (performance,stlSize)
 src/lib/nsas/hash_table.h:62: check_fail: Member variable
 'HashTableSlot<T>::mutex_' is not initialized in the constructor.
 (warning,uninitVar)
 src/lib/nsas/hash_table.h:62: check_fail: Member variable
 'HashTableSlot<T>::list_' is not initialized in the constructor.
 (warning,uninitVar)
 src/lib/nsas/hash_table.h:62: check_fail: Member variable
 'HashTableSlot<T>::mutex_' is not initialized in the constructor.
 (warning,uninitVar)
 src/lib/nsas/hash_table.h:62: check_fail: Member variable
 'HashTableSlot<T>::list_' is not initialized in the constructor.
 (warning,uninitVar)
 src/lib/nsas/hash_table.h:62: check_fail: Member variable
 'HashTableSlot<TestEntry>::mutex_' is not initialized in the constructor.
 (warning,uninitVar)
 src/lib/nsas/hash_table.h:62: check_fail: Member variable
 'HashTableSlot<TestEntry>::list_' is not initialized in the constructor.
 (warning,uninitVar)
 src/lib/nsas/hash_table.h:62: check_fail: Member variable
 'HashTableSlot<TestEntry>::mutex_' is not initialized in the constructor.
 (warning,uninitVar)
 src/lib/nsas/hash_table.h:62: check_fail: Member variable
 'HashTableSlot<TestEntry>::list_' is not initialized in the constructor.
 (warning,uninitVar)
 src/lib/nsas/tests/nameserver_entry_unittest.cc:142: check_fail: Possible
 inefficient checking for 'vec' emptiness. (performance,stlSize)
 src/lib/nsas/tests/nameserver_entry_unittest.cc:177: check_fail: Possible
 inefficient checking for 'vec' emptiness. (performance,stlSize)
 src/lib/nsas/hash_table.h:62: check_fail: Member variable
 'HashTableSlot<T>::mutex_' is not initialized in the constructor.
 (warning,uninitVar)
 src/lib/nsas/hash_table.h:62: check_fail: Member variable
 'HashTableSlot<T>::list_' is not initialized in the constructor.
 (warning,uninitVar)
 src/lib/nsas/zone_entry.cc:332: check_fail: Possible inefficient checking
 for 'probabilities' emptiness. (performance,stlSize)
 *:0: check_fail: Unmatched suppression: debug
 (information,unmatchedSuppression)
 *:0: check_fail: Unmatched suppression: missingInclude
 (information,unmatchedSuppression)
 :: check_fail: Cppcheck cannot find all the include files (use --check-
 config for details) (information,missingInclude)
 }}}

-- 
Ticket URL: <http://bind10.isc.org/ticket/1193>
BIND 10 Development <http://bind10.isc.org>
BIND 10 Development


More information about the bind10-tickets mailing list