BIND 10 #2102: type of test is bool

BIND 10 Development do-not-reply at isc.org
Fri Jun 29 11:03:34 UTC 2012


#2102: type of test is bool
-------------------------------------+-------------------------------------
            Reporter:  fdupont       |                        Owner:
                Type:  enhancement   |                       Status:  new
            Priority:  low           |                    Milestone:  New
           Component:  Unclassified  |  Tasks
           Sensitive:  0             |                     Keywords:
         Sub-Project:  Core          |              Defect Severity:  N/A
Estimated Difficulty:  0             |  Feature Depending on Ticket:
         Total Hours:  0             |          Add Hours to Ticket:  0
                                     |                    Internal?:  0
-------------------------------------+-------------------------------------
 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))

-- 
Ticket URL: <http://bind10.isc.org/ticket/2102>
BIND 10 Development <http://bind10.isc.org>
BIND 10 Development


More information about the bind10-tickets mailing list