Parcourir la source

[master] Finished merge of trac3919 (cppcheck small fixes)

Francis Dupont il y a 9 ans
Parent
commit
26be6ac4ce

+ 4 - 0
ChangeLog

@@ -1,3 +1,7 @@
+970.	[bug]		fdupont
+	Refactored some code to suppress cppcheck warnings.
+	(Trac #3919, git xxx)
+
 969.	[func]		tomek
 969.	[func]		tomek
 	KEA_SOCKET_TEST_DIR environment variable can be used to specify
 	KEA_SOCKET_TEST_DIR environment variable can be used to specify
 	the directory for opening Unix sockets during tests. That may
 	the directory for opening Unix sockets during tests. That may

+ 0 - 1
src/bin/dhcp6/dhcp6_srv.cc

@@ -1611,7 +1611,6 @@ Dhcpv6Srv::assignIA_PD(const Pkt6Ptr& query, const Pkt6Ptr& answer,
     // will try to honor the hint, but it is just a hint - some other address
     // will try to honor the hint, but it is just a hint - some other address
     // may be used instead. If fake_allocation is set to false, the lease will
     // may be used instead. If fake_allocation is set to false, the lease will
     // be inserted into the LeaseMgr as well.
     // be inserted into the LeaseMgr as well.
-    Lease6Collection old_leases;
     AllocEngine::ClientContext6 ctx(subnet, duid, ia->getIAID(), hint, Lease::TYPE_PD,
     AllocEngine::ClientContext6 ctx(subnet, duid, ia->getIAID(), hint, Lease::TYPE_PD,
                                     false, false, string(), fake_allocation);
                                     false, false, string(), fake_allocation);
     ctx.callout_handle_ = getCalloutHandle(query);
     ctx.callout_handle_ = getCalloutHandle(query);

+ 3 - 6
src/bin/dhcp6/json_config_parser.cc

@@ -194,13 +194,10 @@ public:
 
 
         // Try to obtain the pool parameters. It will throw an exception if any
         // Try to obtain the pool parameters. It will throw an exception if any
         // of the required parameters are not present or invalid.
         // of the required parameters are not present or invalid.
-        std::string addr_str;
-        uint32_t prefix_len;
-        uint32_t delegated_len;
         try {
         try {
-            addr_str = string_values_->getParam("prefix");
-            prefix_len = uint32_values_->getParam("prefix-len");
-            delegated_len = uint32_values_->getParam("delegated-len");
+            std::string addr_str = string_values_->getParam("prefix");
+            uint32_t prefix_len = uint32_values_->getParam("prefix-len");
+            uint32_t delegated_len = uint32_values_->getParam("delegated-len");
 
 
             // Attempt to construct the local pool.
             // Attempt to construct the local pool.
             pool_.reset(new Pool6(Lease::TYPE_PD, IOAddress(addr_str),
             pool_.reset(new Pool6(Lease::TYPE_PD, IOAddress(addr_str),

+ 1 - 1
src/bin/dhcp6/tests/dhcp6_srv_unittest.cc

@@ -2086,7 +2086,7 @@ TEST_F(Dhcpv6SrvTest, relayOverrideAndClientClass) {
 /// @param codes a vector of option codes to be created
 /// @param codes a vector of option codes to be created
 /// @param payload specified payload (0 = fill payload with repeating option code)
 /// @param payload specified payload (0 = fill payload with repeating option code)
 /// @return RSOO with nested options
 /// @return RSOO with nested options
-OptionPtr createRSOO(const std::vector<uint16_t> codes, uint8_t payload = 0) {
+OptionPtr createRSOO(const std::vector<uint16_t>& codes, uint8_t payload = 0) {
     OptionDefinitionPtr def = LibDHCP::getOptionDef(Option::V6, D6O_RSOO);
     OptionDefinitionPtr def = LibDHCP::getOptionDef(Option::V6, D6O_RSOO);
     if (!def) {
     if (!def) {
         isc_throw(BadValue, "Can't find RSOO definition");
         isc_throw(BadValue, "Can't find RSOO definition");

+ 1 - 1
src/bin/dhcp6/tests/fqdn_unittest.cc

@@ -389,7 +389,7 @@ public:
                             const std::string& exp_hostname,
                             const std::string& exp_hostname,
                             const uint8_t client_flags =
                             const uint8_t client_flags =
                                 Option6ClientFqdn::FLAG_S,
                                 Option6ClientFqdn::FLAG_S,
-                            const IOAddress expected_address = IOAddress("2001:db8:1:1::dead:beef"),
+                            const IOAddress& expected_address = IOAddress("2001:db8:1:1::dead:beef"),
                             const bool include_oro = true) {
                             const bool include_oro = true) {
         // Create a message of a specified type, add server id and
         // Create a message of a specified type, add server id and
         // FQDN option.
         // FQDN option.

+ 1 - 2
src/bin/perfdhcp/tests/command_options_unittest.cc

@@ -472,7 +472,6 @@ TEST_F(CommandOptionsTest, Base) {
                             " -l 127.0.0.1 all"));
                             " -l 127.0.0.1 all"));
     std::vector<uint8_t> v1 = opt.getMacTemplate();
     std::vector<uint8_t> v1 = opt.getMacTemplate();
     std::vector<uint8_t> v2 = opt.getDuidTemplate();
     std::vector<uint8_t> v2 = opt.getDuidTemplate();
-    v2 = opt.getDuidTemplate();
     EXPECT_TRUE(std::equal(v1.begin(), v1.end(), mac));
     EXPECT_TRUE(std::equal(v1.begin(), v1.end(), mac));
     EXPECT_TRUE(std::equal(v2.begin(), v2.end(), duid));
     EXPECT_TRUE(std::equal(v2.begin(), v2.end(), duid));
     // Test valid DUID.
     // Test valid DUID.
@@ -786,7 +785,7 @@ TEST_F(CommandOptionsTest, Interface) {
     // The local loopback interface should be available.
     // The local loopback interface should be available.
     // If no interface have been found for any reason we should
     // If no interface have been found for any reason we should
     // not fail this test.
     // not fail this test.
-    if (ifaces.size() > 0) {
+    if (!ifaces.empty()) {
         // Get the name of the interface we detected.
         // Get the name of the interface we detected.
         iface_name = (*ifaces.begin())->getName();
         iface_name = (*ifaces.begin())->getName();
         // Use the name in the command parser.
         // Use the name in the command parser.

+ 1 - 0
src/bin/perfdhcp/tests/perf_pkt4_unittest.cc

@@ -74,6 +74,7 @@ public:
             255, 255, 255, 255,     // giaddr
             255, 255, 255, 255,     // giaddr
         };
         };
 
 
+	// cppcheck-suppress variableScope
         uint8_t v4Opts[] = {
         uint8_t v4Opts[] = {
             DHO_HOST_NAME, 3, 0,   1,  2,  // Host name option.
             DHO_HOST_NAME, 3, 0,   1,  2,  // Host name option.
             DHO_BOOT_SIZE, 3, 10, 11, 12,  // Boot file size option
             DHO_BOOT_SIZE, 3, 10, 11, 12,  // Boot file size option

+ 2 - 1
src/lib/asiodns/tests/dns_server_unittest.cc

@@ -1,4 +1,4 @@
-// Copyright (C) 2011  Internet Systems Consortium, Inc. ("ISC")
+// Copyright (C) 2011, 2015  Internet Systems Consortium, Inc. ("ISC")
 //
 //
 // Permission to use, copy, modify, and/or distribute this software for any
 // Permission to use, copy, modify, and/or distribute this software for any
 // purpose with or without fee is hereby granted, provided that the above
 // purpose with or without fee is hereby granted, provided that the above
@@ -269,6 +269,7 @@ class TCPClient : public SimpleClient {
     static const unsigned int SERVER_TIME_OUT = 2;
     static const unsigned int SERVER_TIME_OUT = 2;
     TCPClient(asio::io_service& service, const ip::tcp::endpoint& server)
     TCPClient(asio::io_service& service, const ip::tcp::endpoint& server)
         : SimpleClient(service, SERVER_TIME_OUT),
         : SimpleClient(service, SERVER_TIME_OUT),
+          data_to_send_(""), data_to_send_len_(0),
           send_data_delay_(0), send_data_len_delay_(0)
           send_data_delay_(0), send_data_len_delay_(0)
     {
     {
         server_ = server;
         server_ = server;

+ 3 - 0
src/lib/asiolink/tests/udp_socket_unittest.cc

@@ -177,8 +177,11 @@ TEST(UDPSocket, processReceivedData) {
     uint8_t                 inbuff[32];     // Buffer to check
     uint8_t                 inbuff[32];     // Buffer to check
     OutputBufferPtr         outbuff(new OutputBuffer(16));
     OutputBufferPtr         outbuff(new OutputBuffer(16));
                                             // Where data is put
                                             // Where data is put
+                                            // cppcheck-suppress variableScope
     size_t                  expected;       // Expected amount of data
     size_t                  expected;       // Expected amount of data
+                                            // cppcheck-suppress variableScope    
     size_t                  offset;         // Where to put next data
     size_t                  offset;         // Where to put next data
+                                            // cppcheck-suppress variableScope
     size_t                  cumulative;     // Cumulative data received
     size_t                  cumulative;     // Cumulative data received
 
 
     // Set some dummy values in the buffer to check
     // Set some dummy values in the buffer to check

+ 3 - 1
src/lib/config/tests/module_spec_unittests.cc

@@ -1,4 +1,4 @@
-// Copyright (C) 2009, 2011  Internet Systems Consortium, Inc. ("ISC")
+// Copyright (C) 2009, 2011, 2015  Internet Systems Consortium, Inc. ("ISC")
 //
 //
 // Permission to use, copy, modify, and/or distribute this software for any
 // Permission to use, copy, modify, and/or distribute this software for any
 // purpose with or without fee is hereby granted, provided that the above
 // purpose with or without fee is hereby granted, provided that the above
@@ -306,10 +306,12 @@ TEST(ModuleSpec, CheckFormat) {
     item_default = "";
     item_default = "";
     item_format  = "\"item_format\": \"date\"";
     item_format  = "\"item_format\": \"date\"";
     specs.push_back("," + item_format);
     specs.push_back("," + item_format);
+    // cppcheck-suppress redundantAssignment
     item_default = "";
     item_default = "";
     item_format  = "\"item_format\": \"time\"";
     item_format  = "\"item_format\": \"time\"";
     specs.push_back("," + item_format);
     specs.push_back("," + item_format);
 
 
+    // cppcheck-suppress redundantAssignment
     item_default = "\"item_default\": \"a\"";
     item_default = "\"item_default\": \"a\"";
     specs.push_back("," + item_default);
     specs.push_back("," + item_default);
     item_default = "\"item_default\": \"b\"";
     item_default = "\"item_default\": \"b\"";

+ 1 - 3
src/lib/cryptolink/tests/hash_unittests.cc

@@ -1,4 +1,4 @@
-// Copyright (C) 2014  Internet Systems Consortium, Inc. ("ISC")
+// Copyright (C) 2014, 2015  Internet Systems Consortium, Inc. ("ISC")
 //
 //
 // Permission to use, copy, modify, and/or distribute this software for any
 // Permission to use, copy, modify, and/or distribute this software for any
 // purpose with or without fee is hereby granted, provided that the above
 // purpose with or without fee is hereby granted, provided that the above
@@ -560,8 +560,6 @@ namespace {
 }
 }
 
 
 TEST(HashTest, HashLength) {
 TEST(HashTest, HashLength) {
-    std::vector<uint8_t> result;
-
     EXPECT_EQ(8, digestVectorLength(MD5, 8));
     EXPECT_EQ(8, digestVectorLength(MD5, 8));
     EXPECT_EQ(16, digestVectorLength(MD5, 16));
     EXPECT_EQ(16, digestVectorLength(MD5, 16));
     EXPECT_EQ(16, digestVectorLength(MD5, 40));
     EXPECT_EQ(16, digestVectorLength(MD5, 40));

+ 0 - 2
src/lib/cryptolink/tests/hmac_unittests.cc

@@ -638,8 +638,6 @@ namespace {
 }
 }
 
 
 TEST(HMACTest, HMACSigLengthArgument) {
 TEST(HMACTest, HMACSigLengthArgument) {
-    std::vector<uint8_t> sig;
-
     EXPECT_EQ(8, sigVectorLength(MD5, 8));
     EXPECT_EQ(8, sigVectorLength(MD5, 8));
     EXPECT_EQ(16, sigVectorLength(MD5, 16));
     EXPECT_EQ(16, sigVectorLength(MD5, 16));
     EXPECT_EQ(16, sigVectorLength(MD5, 40));
     EXPECT_EQ(16, sigVectorLength(MD5, 40));

+ 0 - 1
src/lib/dhcp/iface_mgr.cc

@@ -487,7 +487,6 @@ IfaceMgr::openSockets4(const uint16_t port, const bool use_bcast,
             }
             }
         }
         }
 
 
-        Iface::AddressCollection addrs = iface->getAddresses();
         BOOST_FOREACH(Iface::Address addr, iface->getAddresses()) {
         BOOST_FOREACH(Iface::Address addr, iface->getAddresses()) {
             // Skip non-IPv4 addresses and those that weren't selected..
             // Skip non-IPv4 addresses and those that weren't selected..
             if (!addr.get().isV4() || !addr.isSpecified()) {
             if (!addr.get().isV4() || !addr.isSpecified()) {

+ 4 - 2
src/lib/dhcp/libdhcp++.cc

@@ -363,7 +363,8 @@ size_t LibDHCP::unpackOptions6(const OptionBuffer& buf,
         offset += opt_len;
         offset += opt_len;
     }
     }
 
 
-    return (offset);
+    last_offset = offset;
+    return (last_offset);
 }
 }
 
 
 size_t LibDHCP::unpackOptions4(const OptionBuffer& buf,
 size_t LibDHCP::unpackOptions4(const OptionBuffer& buf,
@@ -463,7 +464,8 @@ size_t LibDHCP::unpackOptions4(const OptionBuffer& buf,
         options.insert(std::make_pair(opt_type, opt));
         options.insert(std::make_pair(opt_type, opt));
         offset += opt_len;
         offset += opt_len;
     }
     }
-    return (offset);
+    last_offset = offset;
+    return (last_offset);
 }
 }
 
 
 size_t LibDHCP::unpackVendorOptions6(const uint32_t vendor_id,
 size_t LibDHCP::unpackVendorOptions6(const uint32_t vendor_id,

+ 3 - 0
src/lib/dhcp/pkt4.cc

@@ -81,6 +81,9 @@ Pkt4::Pkt4(const uint8_t* data, size_t len)
 
 
     data_.resize(len);
     data_.resize(len);
     memcpy(&data_[0], data, len);
     memcpy(&data_[0], data, len);
+
+    memset(sname_, 0, MAX_SNAME_LEN);
+    memset(file_, 0, MAX_FILE_LEN);
 }
 }
 
 
 size_t
 size_t

+ 1 - 2
src/lib/dhcp/tests/pkt6_unittest.cc

@@ -828,8 +828,7 @@ TEST_F(Pkt6Test, relayPack) {
     EXPECT_EQ(opt->len(), optRelay1->len());
     EXPECT_EQ(opt->len(), optRelay1->len());
     OptionBuffer data = opt->getData();
     OptionBuffer data = opt->getData();
     ASSERT_EQ(data.size(), sizeof(relay_opt_data));
     ASSERT_EQ(data.size(), sizeof(relay_opt_data));
-    EXPECT_EQ(0,
-              memcmp(relay_opt_data, relay_opt_data, sizeof(relay_opt_data)));
+    EXPECT_EQ(0, memcmp(&data[0], relay_opt_data, sizeof(relay_opt_data)));
 }
 }
 
 
 
 

+ 2 - 1
src/lib/dhcpsrv/lease.h

@@ -246,7 +246,8 @@ struct Lease4 : public Lease {
     /// @brief Default constructor
     /// @brief Default constructor
     ///
     ///
     /// Initialize fields that don't have a default constructor.
     /// Initialize fields that don't have a default constructor.
-    Lease4() : Lease(0, 0, 0, 0, 0, 0, false, false, "", HWAddrPtr()) {
+    Lease4() : Lease(0, 0, 0, 0, 0, 0, false, false, "", HWAddrPtr()), ext_(0)
+    {
     }
     }
 
 
     /// @brief Copy constructor
     /// @brief Copy constructor

+ 3 - 0
src/lib/dhcpsrv/mysql_lease_mgr.cc

@@ -308,6 +308,7 @@ public:
     /// all variables are initialized/set in the methods before they are used.
     /// all variables are initialized/set in the methods before they are used.
     MySqlLease4Exchange() : addr4_(0), hwaddr_length_(0), client_id_length_(0),
     MySqlLease4Exchange() : addr4_(0), hwaddr_length_(0), client_id_length_(0),
                             client_id_null_(MLM_FALSE),
                             client_id_null_(MLM_FALSE),
+                            subnet_id_(0), valid_lifetime_(0),
                             fqdn_fwd_(false), fqdn_rev_(false), hostname_length_(0) {
                             fqdn_fwd_(false), fqdn_rev_(false), hostname_length_(0) {
         memset(hwaddr_buffer_, 0, sizeof(hwaddr_buffer_));
         memset(hwaddr_buffer_, 0, sizeof(hwaddr_buffer_));
         memset(client_id_buffer_, 0, sizeof(client_id_buffer_));
         memset(client_id_buffer_, 0, sizeof(client_id_buffer_));
@@ -666,6 +667,8 @@ public:
     /// The initialization of the variables here is nonly to satisfy cppcheck -
     /// The initialization of the variables here is nonly to satisfy cppcheck -
     /// all variables are initialized/set in the methods before they are used.
     /// all variables are initialized/set in the methods before they are used.
     MySqlLease6Exchange() : addr6_length_(0), duid_length_(0),
     MySqlLease6Exchange() : addr6_length_(0), duid_length_(0),
+                            iaid_(0), lease_(0), lease_type_(0), prefixlen_(0),
+                            pref_lifetime_(0), subnet_id_(0), valid_lifetime_(0),
                             fqdn_fwd_(false), fqdn_rev_(false),
                             fqdn_fwd_(false), fqdn_rev_(false),
                             hostname_length_(0), hwaddr_length_(0),
                             hostname_length_(0), hwaddr_length_(0),
                             hwaddr_null_(MLM_FALSE), hwtype_(0), hwaddr_source_(0) {
                             hwaddr_null_(MLM_FALSE), hwtype_(0), hwaddr_source_(0) {

+ 2 - 2
src/lib/dns/master_loader.cc

@@ -670,7 +670,7 @@ MasterLoader::MasterLoaderImpl::generateForIter(const std::string& str,
               int offset = 0;
               int offset = 0;
               unsigned int width;
               unsigned int width;
               char base[2] = {'d', 0}; // char plus null byte
               char base[2] = {'d', 0}; // char plus null byte
-              // cppcheck-suppress invalidscanf
+              // cppcheck-suppress invalidscanf_libc
               const int n = sscanf(scan_str, "{%d,%u,%1[doxXnN]}",
               const int n = sscanf(scan_str, "{%d,%u,%1[doxXnN]}",
                                    &offset, &width, base);
                                    &offset, &width, base);
               switch (n) {
               switch (n) {
@@ -807,7 +807,7 @@ MasterLoader::MasterLoaderImpl::doGenerate() {
     unsigned int start;
     unsigned int start;
     unsigned int stop;
     unsigned int stop;
     unsigned int step;
     unsigned int step;
-    // cppcheck-suppress invalidscanf
+    // cppcheck-suppress invalidscanf_libc
     const int n = sscanf(range.c_str(), "%u-%u/%u", &start, &stop, &step);
     const int n = sscanf(range.c_str(), "%u-%u/%u", &start, &stop, &step);
     if ((n < 2) || (stop < start)) {
     if ((n < 2) || (stop < start)) {
         reportError(lexer_.getSourceName(), lexer_.getSourceLine(),
         reportError(lexer_.getSourceName(), lexer_.getSourceLine(),

+ 2 - 2
src/lib/dns/rdata/generic/naptr_35.cc

@@ -1,4 +1,4 @@
-// Copyright (C) 2011  Internet Systems Consortium, Inc. ("ISC")
+// Copyright (C) 2011, 2015  Internet Systems Consortium, Inc. ("ISC")
 //
 //
 // Permission to use, copy, modify, and/or distribute this software for any
 // Permission to use, copy, modify, and/or distribute this software for any
 // purpose with or without fee is hereby granted, provided that the above
 // purpose with or without fee is hereby granted, provided that the above
@@ -34,7 +34,7 @@ using namespace isc::dns;
 
 
 class NAPTRImpl {
 class NAPTRImpl {
 public:
 public:
-    NAPTRImpl() : replacement(".") {}
+    NAPTRImpl() : order(0), preference(0), replacement(".") {}
 
 
     NAPTRImpl(InputBuffer& buffer, size_t rdata_len) : replacement(".") {
     NAPTRImpl(InputBuffer& buffer, size_t rdata_len) : replacement(".") {
         if (rdata_len < 4 || buffer.getLength() - buffer.getPosition() < 4) {
         if (rdata_len < 4 || buffer.getLength() - buffer.getPosition() < 4) {

+ 2 - 2
src/lib/dns/rdataclass.cc

@@ -5,7 +5,7 @@
 ///////////////
 ///////////////
 ///////////////
 ///////////////
 
 
-// Copyright (C) 2010-2014  Internet Systems Consortium, Inc. ("ISC")
+// Copyright (C) 2010-2015  Internet Systems Consortium, Inc. ("ISC")
 //
 //
 // Permission to use, copy, modify, and/or distribute this software for any
 // Permission to use, copy, modify, and/or distribute this software for any
 // purpose with or without fee is hereby granted, provided that the above
 // purpose with or without fee is hereby granted, provided that the above
@@ -2565,7 +2565,7 @@ namespace generic {
 
 
 class NAPTRImpl {
 class NAPTRImpl {
 public:
 public:
-    NAPTRImpl() : replacement(".") {}
+    NAPTRImpl() : order(0), preference(0), replacement(".") {}
 
 
     NAPTRImpl(InputBuffer& buffer, size_t rdata_len) : replacement(".") {
     NAPTRImpl(InputBuffer& buffer, size_t rdata_len) : replacement(".") {
         if (rdata_len < 4 || buffer.getLength() - buffer.getPosition() < 4) {
         if (rdata_len < 4 || buffer.getLength() - buffer.getPosition() < 4) {

+ 4 - 2
src/lib/dns/rrclass.cc

@@ -1,4 +1,4 @@
-// Copyright (C) 2010  Internet Systems Consortium, Inc. ("ISC")
+// Copyright (C) 2010, 2015  Internet Systems Consortium, Inc. ("ISC")
 //
 //
 // Permission to use, copy, modify, and/or distribute this software for any
 // Permission to use, copy, modify, and/or distribute this software for any
 // purpose with or without fee is hereby granted, provided that the above
 // purpose with or without fee is hereby granted, provided that the above
@@ -31,10 +31,12 @@ namespace isc {
 namespace dns {
 namespace dns {
 
 
 RRClass::RRClass(const std::string& class_str) {
 RRClass::RRClass(const std::string& class_str) {
-    if (!RRParamRegistry::getRegistry().textToClassCode(class_str, classcode_)) {
+    uint16_t classcode;
+    if (!RRParamRegistry::getRegistry().textToClassCode(class_str, classcode)) {
         isc_throw(InvalidRRClass,
         isc_throw(InvalidRRClass,
                   "Unrecognized RR class string: " + class_str);
                   "Unrecognized RR class string: " + class_str);
     }
     }
+    classcode_ = classcode;
 }
 }
 
 
 RRClass::RRClass(InputBuffer& buffer) {
 RRClass::RRClass(InputBuffer& buffer) {

+ 4 - 2
src/lib/dns/rrtype.cc

@@ -1,4 +1,4 @@
-// Copyright (C) 2010  Internet Systems Consortium, Inc. ("ISC")
+// Copyright (C) 2010, 2015  Internet Systems Consortium, Inc. ("ISC")
 //
 //
 // Permission to use, copy, modify, and/or distribute this software for any
 // Permission to use, copy, modify, and/or distribute this software for any
 // purpose with or without fee is hereby granted, provided that the above
 // purpose with or without fee is hereby granted, provided that the above
@@ -32,10 +32,12 @@ namespace isc {
 namespace dns {
 namespace dns {
 
 
 RRType::RRType(const std::string& type_str) {
 RRType::RRType(const std::string& type_str) {
-    if (!RRParamRegistry::getRegistry().textToTypeCode(type_str, typecode_)) {
+    uint16_t typecode;
+    if (!RRParamRegistry::getRegistry().textToTypeCode(type_str, typecode)) {
         isc_throw(InvalidRRType,
         isc_throw(InvalidRRType,
                   "Unrecognized RR type string: " + type_str);
                   "Unrecognized RR type string: " + type_str);
     }
     }
+    typecode_ = typecode;
 }
 }
 
 
 RRType::RRType(InputBuffer& buffer) {
 RRType::RRType(InputBuffer& buffer) {

+ 4 - 1
src/lib/dns/tests/tsig_unittest.cc

@@ -1,4 +1,4 @@
-// Copyright (C) 2011, 2014  Internet Systems Consortium, Inc. ("ISC")
+// Copyright (C) 2011, 2014, 2015  Internet Systems Consortium, Inc. ("ISC")
 //
 //
 // Permission to use, copy, modify, and/or distribute this software for any
 // Permission to use, copy, modify, and/or distribute this software for any
 // purpose with or without fee is hereby granted, provided that the above
 // purpose with or without fee is hereby granted, provided that the above
@@ -51,6 +51,9 @@ using namespace isc::dns::rdata;
 using isc::UnitTestUtil;
 using isc::UnitTestUtil;
 using isc::util::unittests::matchWireData;
 using isc::util::unittests::matchWireData;
 
 
+// @note: blocks and SCOPED_TRACE can make buggy cppchecks raise
+// a spurious syntax error...
+
 // See dnssectime.cc
 // See dnssectime.cc
 namespace isc {
 namespace isc {
 namespace util {
 namespace util {