Parcourir la source

[2673] Further changes to fix build problems under g++

The previous commit disabled unused parameter warnings in the DHCP
code  when compiling with clang.  g++ picked up some additional
warnings/errors, and this fix corrects those.
Stephen Morris il y a 12 ans
Parent
commit
c274bccc9c

+ 1 - 1
src/bin/dhcp4/dhcp4_srv.cc

@@ -648,7 +648,7 @@ Dhcpv4Srv::processRelease(Pkt4Ptr& release) {
 }
 
 void
-Dhcpv4Srv::processDecline(Pkt4Ptr& decline) {
+Dhcpv4Srv::processDecline(Pkt4Ptr& /* decline */) {
     /// TODO: Implement this.
 }
 

+ 1 - 1
src/bin/dhcp4/tests/dhcp4_srv_unittest.cc

@@ -238,7 +238,7 @@ public:
     /// @param t1_mandatory is T1 mandatory?
     /// @param t2_mandatory is T2 mandatory?
     void checkAddressParams(const Pkt4Ptr& rsp, const SubnetPtr subnet,
-                            bool t1_mandatory = false, bool t2_mandatory = false) {
+                            bool t1_mandatory = false, bool /* t2_mandatory */ = false) {
 
         // Technically inPool implies inRange, but let's be on the safe
         // side and check both.

+ 2 - 2
src/bin/dhcp6/dhcp6_srv.cc

@@ -699,7 +699,7 @@ Dhcpv6Srv::assignIA_NA(const Subnet6Ptr& subnet, const DuidPtr& duid,
 
 OptionPtr
 Dhcpv6Srv::renewIA_NA(const Subnet6Ptr& subnet, const DuidPtr& duid,
-                      Pkt6Ptr question, boost::shared_ptr<Option6IA> ia) {
+                      Pkt6Ptr /* question */, boost::shared_ptr<Option6IA> ia) {
     Lease6Ptr lease = LeaseMgrFactory::instance().getLease6(*duid, ia->getIAID(),
                                                             subnet->getID());
 
@@ -857,7 +857,7 @@ Dhcpv6Srv::releaseLeases(const Pkt6Ptr& release, Pkt6Ptr& reply) {
 }
 
 OptionPtr
-Dhcpv6Srv::releaseIA_NA(const DuidPtr& duid, Pkt6Ptr question,
+Dhcpv6Srv::releaseIA_NA(const DuidPtr& duid, Pkt6Ptr /* question */,
                         int& general_status, boost::shared_ptr<Option6IA> ia) {
     // Release can be done in one of two ways:
     // Approach 1: extract address from client's IA_NA and see if it belongs

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

@@ -222,7 +222,8 @@ public:
     // Check that generated IAADDR option contains expected address.
     void checkIAAddr(const boost::shared_ptr<Option6IAAddr>& addr,
                      const IOAddress& expected_addr,
-                     uint32_t expected_preferred, uint32_t expected_valid) {
+                     uint32_t /* expected_preferred */,
+                     uint32_t /* expected_valid */) {
 
         // Check that the assigned address is indeed from the configured pool.
         // Note that when comparing addresses, we compare the textual