Browse Source

[3035] Removed const for enums in DHCPv4 FQDN unit tests.

The cppcheck expects that the const enum value is passed by reference and
outputs errors. In the same time it doesn't expect that non-const enum
is passed by reference. Since there is no need to pass an enum by reference
the const was removed for enum values as a workaround. It doesn't have
an impact on the test.
Marcin Siodelski 11 years ago
parent
commit
90b595cca8
1 changed files with 4 additions and 7 deletions
  1. 4 7
      src/bin/dhcp4/tests/fqdn_unittest.cc

+ 4 - 7
src/bin/dhcp4/tests/fqdn_unittest.cc

@@ -59,7 +59,7 @@ public:
     Option4ClientFqdnPtr
     createClientFqdn(const uint8_t flags,
                      const std::string& fqdn_name,
-                     const Option4ClientFqdn::DomainNameType fqdn_type) {
+                     Option4ClientFqdn::DomainNameType fqdn_type) {
         return (Option4ClientFqdnPtr(new Option4ClientFqdn(flags,
                                                            Option4ClientFqdn::
                                                            RCODE_CLIENT(),
@@ -103,8 +103,7 @@ public:
     Pkt4Ptr generatePktWithFqdn(const uint8_t msg_type,
                                 const uint8_t fqdn_flags,
                                 const std::string& fqdn_domain_name,
-                                const Option4ClientFqdn::DomainNameType
-                                fqdn_type,
+                                Option4ClientFqdn::DomainNameType fqdn_type,
                                 const bool include_prl,
                                 const bool include_clientid = true) {
         Pkt4Ptr pkt = Pkt4Ptr(new Pkt4(msg_type, 1234));
@@ -156,16 +155,14 @@ public:
         pkt->addOption(createHostname(hostname));
 
         return (pkt);
-        
-    }
-                                    
 
+    }
 
     // Test that server generates the appropriate FQDN option in response to
     // client's FQDN option.
     void testProcessFqdn(const Pkt4Ptr& query, const uint8_t exp_flags,
                          const std::string& exp_domain_name,
-                         const Option4ClientFqdn::DomainNameType
+                         Option4ClientFqdn::DomainNameType
                          exp_domain_type = Option4ClientFqdn::FULL) {
         ASSERT_TRUE(getClientFqdnOption(query));