Opened 8 years ago

Closed 6 years ago

#2102 closed enhancement (wontfix)

type of test is bool

Reported by: fdupont Owned by:
Priority: low Milestone: Remaining BIND10 tickets
Component: Unclassified Version: bind10-old
Keywords: Cc:
CVSS Scoring: Parent Tickets:
Sensitive: no Defect Severity: N/A
Sub-Project: Core Feature Depending on Ticket: windows
Estimated Difficulty: 4 Add Hours to Ticket: 0
Total Hours: 0 Internal?: no

Description

in if (test) then (true_branch) else (false_branch) the type of <test> is bool (and branches have compatible types). Windows C++ compiler emits a warning when the test has another type, i.e., it is checked against 0, because it can impact the performance (and BTW is bad style).
An example is the ASSERT_TRUE()s in src/lib/acl/tests/loader_test.cc which are against pointers (so ASSERT_TRUE(foo) -> ASSERT_TRUE(foo != NULL))

Subtickets

Change History (9)

comment:1 in reply to: ↑ description ; follow-up: Changed 8 years ago by jinmei

Replying to fdupont:

An example is the ASSERT_TRUE()s in src/lib/acl/tests/loader_test.cc which are against pointers (so ASSERT_TRUE(foo) -> ASSERT_TRUE(foo != NULL))

(just a comment) It's also against part of our coding guideline
derived from that of BIND 9. I normally point them out when find them
in code review, but of course such human efforts cannot be
comprehensive.

comment:2 in reply to: ↑ 1 Changed 8 years ago by fdupont

Replying to jinmei:

Replying to fdupont:

An example is the ASSERT_TRUE()s in src/lib/acl/tests/loader_test.cc which are against pointers (so ASSERT_TRUE(foo) -> ASSERT_TRUE(foo != NULL))

(just a comment) It's also against part of our coding guideline
derived from that of BIND 9. I normally point them out when find them
in code review, but of course such human efforts cannot be
comprehensive.

=> the WIN32 port can get more (for instance a "int found1 = false;"...).

comment:3 follow-up: Changed 8 years ago by muks

Please attach a complete list (make -k) of all issues that are reported during the Win32 compile.

comment:4 in reply to: ↑ 3 Changed 8 years ago by fdupont

Replying to muks:

Please attach a complete list (make -k) of all issues that are reported during the Win32 compile.

=> make -k? It is Windows with Visual Studio so very different. But I cut & pasted the output of full builds for VS 2008 and 2010 in Release and Debug configs. The (LARGE) files are attached to the trac826 branch.
BTW I fixed them in the trac826 branch (all of them but the changes cover only the library, i.e., there should be others in commands).

comment:5 Changed 8 years ago by shane

  • Estimated Difficulty changed from 0 to 4

comment:6 Changed 8 years ago by shane

  • Feature Depending on Ticket set to Windows port
  • Milestone New Tasks deleted

comment:7 Changed 8 years ago by shane

  • Feature Depending on Ticket changed from Windows port to windows

comment:8 Changed 6 years ago by tomek

  • Milestone set to Remaining BIND10 tickets

comment:9 Changed 6 years ago by tomek

  • Resolution set to wontfix
  • Status changed from new to closed
  • Version set to old-bind10

This issue is related to bind10 code that is no longer part of Kea.

If you are interested in BIND10/Bundy framework or its DNS components,
please check http://bundy-dns.de.

Closing ticket.

Note: See TracTickets for help on using tickets.