BIND 10 #2726: New cppcheck regressions

BIND 10 Development do-not-reply at isc.org
Wed Feb 13 05:14:20 UTC 2013


#2726: New cppcheck regressions
-------------------------------------+-------------------------------------
                   Reporter:  muks   |                 Owner:
                       Type:         |                Status:  new
  defect                             |             Milestone:  Next-Sprint-
                   Priority:         |  Proposed
  medium                             |              Keywords:
                  Component:         |             Sensitive:  0
  Unclassified                       |           Sub-Project:  DNS
               CVSS Scoring:         |  Estimated Difficulty:  0
            Defect Severity:  N/A    |           Total Hours:  0
Feature Depending on Ticket:         |
        Add Hours to Ticket:  0      |
                  Internal?:  0      |
-------------------------------------+-------------------------------------
 The upstream ticket we reported suggested that we add a new argument when
 calling cppcheck:
 http://sourceforge.net/apps/trac/cppcheck/ticket/4574

 With this argument, there are many new reports:
 {{{
 cppcheck -I./src/lib --enable=all --suppressions src/cppcheck-suppress.lst
 --inline-suppr \
         --quiet --error-exitcode=1 \
         --template '{file}:{line}: check_fail: {message}
 ({severity},{id})' \
         src
 src/lib/datasrc/memory/domaintree.h:704: check_fail: Member variable
 'DomainTreeNodeChain::nodes_' is not initialized in the constructor.
 (warning,uninitMemberVar)
 src/lib/dns/serial.h:62: check_fail: 'Serial::operator=' should return
 'Serial &'. (style,operatorEq)
 src/lib/util/buffer.h:344: check_fail: 'operator=' should check for
 assignment to self to avoid problems with dynamic memory.
 (warning,operatorEqToSelf)
 src/lib/util/unittests/mock_socketsession.h:43: check_fail: Member
 variable 'MockSocketSessionForwarder::pushed_sock_' is not initialized in
 the constructor. (warning,uninitMemberVar)
 src/lib/util/unittests/mock_socketsession.h:43: check_fail: Member
 variable 'MockSocketSessionForwarder::pushed_family_' is not initialized
 in the constructor. (warning,uninitMemberVar)
 src/lib/util/unittests/mock_socketsession.h:43: check_fail: Member
 variable 'MockSocketSessionForwarder::pushed_type_' is not initialized in
 the constructor. (warning,uninitMemberVar)
 src/lib/util/unittests/mock_socketsession.h:43: check_fail: Member
 variable 'MockSocketSessionForwarder::pushed_protocol_' is not initialized
 in the constructor. (warning,uninitMemberVar)
 src/lib/statistics/counter.h:67: check_fail: Function parameter 'type'
 should be passed by reference. (performance,passedByValue)
 src/lib/statistics/counter.h:80: check_fail: Function parameter 'type'
 should be passed by reference. (performance,passedByValue)
 src/lib/testutils/mockups.h:109: check_fail: The class 'MockDNSService'
 does not have a constructor. (style,noConstructor)
 src/bin/sockcreator/sockcreator.cc:1: check_fail: Skipping configuration
 'IPV6_MTU' because it seems to be invalid. Use -D if you want to check it.
 (information,ConfigurationNotChecked)
 src/bin/sockcreator/sockcreator.cc:1: check_fail: Skipping configuration
 'IPV6_MTU_DISCOVER;IPV6_PMTUDISC_DONT' because it seems to be invalid. Use
 -D if you want to check it. (information,ConfigurationNotChecked)
 src/bin/sockcreator/sockcreator.cc:1: check_fail: Skipping configuration
 'IPV6_USE_MIN_MTU' because it seems to be invalid. Use -D if you want to
 check it. (information,ConfigurationNotChecked)
 src/bin/sockcreator/tests/sockcreator_tests.cc:1: check_fail: Skipping
 configuration 'IPV6_MTU_DISCOVER;IPV6_PMTUDISC_DONT' because it seems to
 be invalid. Use -D if you want to check it.
 (information,ConfigurationNotChecked)
 src/bin/sockcreator/tests/sockcreator_tests.cc:1: check_fail: Skipping
 configuration 'IPV6_USE_MIN_MTU' because it seems to be invalid. Use -D if
 you want to check it. (information,ConfigurationNotChecked)
 src/lib/asiodns/io_fetch.cc:413: check_fail: The scope of the variable
 'PROTOCOL' can be reduced. (style,variableScope)
 src/lib/datasrc/rbtree.h:644: check_fail: Member variable
 'RBTreeNodeChain::nodes_' is not initialized in the constructor.
 (warning,uninitMemberVar)
 src/lib/datasrc/memory_datasrc_link.cc:132: check_fail: Instance of
 'RRClass' object is destroyed immediately. (error,unusedScopedObject)
 src/lib/datasrc/tests/factory_unittest.cc:43: check_fail: Instance of
 'DataSourceClientContainer' object is destroyed immediately.
 (error,unusedScopedObject)
 src/lib/dhcp/option_data_types.cc:173: check_fail: Possible inefficient
 checking for 'buf' emptiness. (performance,stlSize)
 src/lib/dns/rdata.cc:313: check_fail: 'operator=' should check for
 assignment to self to avoid problems with dynamic memory.
 (warning,operatorEqToSelf)
 src/lib/dns/rdata/generic/detail/ds_like.h:132: check_fail: Variable
 'digest_' is assigned in constructor body. Consider performing
 initialization in initialization list. (performance,useInitializationList)
 src/lib/dns/rdataclass.cc:260: check_fail: 'operator=' should check for
 assignment to self to avoid problems with dynamic memory.
 (warning,operatorEqToSelf)
 src/lib/dns/rdataclass.cc:917: check_fail: 'operator=' should check for
 assignment to self to avoid problems with dynamic memory.
 (warning,operatorEqToSelf)
 src/lib/dns/rdataclass.cc:1228: check_fail: 'operator=' should check for
 assignment to self to avoid problems with dynamic memory.
 (warning,operatorEqToSelf)
 src/lib/dns/rdataclass.cc:1375: check_fail: 'operator=' should check for
 assignment to self to avoid problems with dynamic memory.
 (warning,operatorEqToSelf)
 src/lib/dns/rdataclass.cc:2466: check_fail: 'operator=' should check for
 assignment to self to avoid problems with dynamic memory.
 (warning,operatorEqToSelf)
 src/lib/dns/rdataclass.cc:2697: check_fail: 'operator=' should check for
 assignment to self to avoid problems with dynamic memory.
 (warning,operatorEqToSelf)
 src/lib/dns/rdataclass.cc:2893: check_fail: 'operator=' should check for
 assignment to self to avoid problems with dynamic memory.
 (warning,operatorEqToSelf)
 src/lib/dns/rdataclass.cc:3449: check_fail: 'operator=' should check for
 assignment to self to avoid problems with dynamic memory.
 (warning,operatorEqToSelf)
 src/lib/dns/rdataclass.cc:3827: check_fail: 'operator=' should check for
 assignment to self to avoid problems with dynamic memory.
 (warning,operatorEqToSelf)
 src/lib/dns/rdataclass.cc:4156: check_fail: 'operator=' should check for
 assignment to self to avoid problems with dynamic memory.
 (warning,operatorEqToSelf)
 src/lib/dns/rdataclass.cc:4842: check_fail: 'operator=' should check for
 assignment to self to avoid problems with dynamic memory.
 (warning,operatorEqToSelf)
 src/lib/dns/rdataclass.cc:293: check_fail: Possible inefficient checking
 for 'mac_' emptiness. (performance,stlSize)
 src/lib/dns/rdataclass.cc:299: check_fail: Possible inefficient checking
 for 'other_data_' emptiness. (performance,stlSize)
 src/lib/dns/rdataclass.cc:443: check_fail: Possible inefficient checking
 for 'mac_' emptiness. (performance,stlSize)
 src/lib/dns/rdataclass.cc:467: check_fail: Possible inefficient checking
 for 'other_data_' emptiness. (performance,stlSize)
 src/lib/dns/tsigkey.cc:150: check_fail: 'operator=' should check for
 assignment to self to avoid problems with dynamic memory.
 (warning,operatorEqToSelf)
 src/lib/dns/tsigkey.cc:183: check_fail: Possible inefficient checking for
 'secret_' emptiness. (performance,stlSize)
 src/lib/log/message_exception.h:63: check_fail: Member variable
 'MessageException::lineno_' is not initialized in the constructor.
 (warning,uninitMemberVar)
 src/lib/log/message_exception.h:82: check_fail: Member variable
 'MessageException::lineno_' is not initialized in the constructor.
 (warning,uninitMemberVar)
 src/lib/log/logger_manager.h:43: check_fail: 'class LoggerManager' does
 not have a copy constructor which is recommended since the class contains
 a pointer to allocated memory. (style,noCopyConstructor)
 src/lib/log/message_reader.cc:130: check_fail: Possible inefficient
 checking for 'tokens' emptiness. (performance,stlSize)
 src/lib/log/tests/log_formatter_unittest.cc:1: check_fail: Skipping
 configuration 'ENABLE_LOGGER_CHECKS;EXPECT_DEATH' because it seems to be
 invalid. Use -D if you want to check it.
 (information,ConfigurationNotChecked)
 src/lib/log/tests/logger_unittest.cc:1: check_fail: Skipping configuration
 'EXPECT_DEATH' because it seems to be invalid. Use -D if you want to check
 it. (information,ConfigurationNotChecked)
 src/lib/log/tests/message_initializer_2_unittest.cc:1: check_fail:
 Skipping configuration 'EXPECT_DEATH' because it seems to be invalid. Use
 -D if you want to check it. (information,ConfigurationNotChecked)
 src/lib/server_common/portconfig.cc:52: check_fail: Instance of
 'IOAddress' object is destroyed immediately. (error,unusedScopedObject)
 src/lib/server_common/tests/portconfig_unittest.cc:1: check_fail: Skipping
 configuration 'EXPECT_DEATH' because it seems to be invalid. Use -D if you
 want to check it. (information,ConfigurationNotChecked)
 src/lib/util/io/fd_share.cc:1: check_fail: Skipping configuration
 'CMSG_LEN' because it seems to be invalid. Use -D if you want to check it.
 (information,ConfigurationNotChecked)
 src/lib/util/io/fd_share.cc:1: check_fail: Skipping configuration
 'CMSG_SPACE' because it seems to be invalid. Use -D if you want to check
 it. (information,ConfigurationNotChecked)
 src/lib/util/tests/buffer_unittest.cc:1: check_fail: Skipping
 configuration 'EXPECT_DEATH' because it seems to be invalid. Use -D if you
 want to check it. (information,ConfigurationNotChecked)
 make: *** [cppcheck] Error 1
 }}}

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


More information about the bind10-tickets mailing list