Opened 7 years ago

Closed 7 years ago

#2789 closed defect (fixed)

Pool6::prefix_len_ is unused

Reported by: jinmei Owned by: tmark
Priority: medium Milestone: Sprint-DHCP-20130328
Component: libdhcp Version:
Keywords: Cc:
CVSS Scoring: Parent Tickets:
Sensitive: no Defect Severity: N/A
Sub-Project: DHCP Feature Depending on Ticket:
Estimated Difficulty: 0 Add Hours to Ticket: 0
Total Hours: 0 Internal?: no

Description

It's defined in src/lib/dhcpsrv/pool.h.

A recent (maybe Apple-hacked) version of clang++ warns about it and
then promotes it to an error with -Werror. I'm not sure about the
intended use for it so for now I plan to introduce a workaround of
using it in the validity check for #2705. If it's not really needed
it should be removed; if it should be used in some way, it should be
actually used, obviously. And, in that case, it should be defined as
const unless it can be modified in the lifetime of the class.

Subtickets

Attachments (1)

test-suite.log (13.1 KB) - added by tmark 7 years ago.
Unit test log for lib/dhcpsrv

Download all attachments as: .zip

Change History (10)

comment:1 Changed 7 years ago by jelte

  • Milestone changed from New Tasks to DHCP Outstanding Tasks

comment:2 Changed 7 years ago by stephen

  • Milestone changed from DHCP Outstanding Tasks to Sprint-DHCP-20130328

comment:3 Changed 7 years ago by tomek

This field is waiting for us to implement prefix delegation support.
But it is true - it shouldn't be left completely unused.

comment:4 Changed 7 years ago by tmark

  • Owner set to tmark
  • Status changed from new to accepted

comment:5 Changed 7 years ago by tmark

As prefix delegation is not on the schedule, I removed the private member, prefix_len_. Changes required were very minimal. It's presence is premature and may or may not be part of the eventual implementation. Unit test log for lib/dhcpsrv is attached, which verifies the Pool6 constructors function correctly. (Note test log shows two unit tests failing due to an unrelated issue covered by trac# 2789).

Changed 7 years ago by tmark

Unit test log for lib/dhcpsrv

comment:6 Changed 7 years ago by tmark

  • Owner changed from tmark to UnAssigned
  • Status changed from accepted to reviewing

comment:7 Changed 7 years ago by marcin

  • Owner changed from UnAssigned to marcin

comment:8 Changed 7 years ago by marcin

  • Owner changed from marcin to tmark

Reviewed commit c5f8c4c31d08049b5b8b1e7ab43011d62293f18b

Please update dates in the copyright headers in ''pool.h'' and ''pool.cc''.

Once you're done, please merge. I don't need to see the ticket again.

comment:9 Changed 7 years ago by tmark

  • Resolution set to fixed
  • Status changed from reviewing to closed

Copyright dates updated. Changes merged.

Note: See TracTickets for help on using tickets.