Opened 14 years ago

Closed 13 years ago

Last modified 9 years ago

#2765 closed Bugs (fixed)

"warning C4127: conditional expression is constant"

Reported by: m.champlon@… Owned by: Gennadiy Rozental
Milestone: Boost 1.39.0 Component: test
Version: Boost 1.38.0 Severity: Problem
Keywords: warning conditional expression constant Cc:

Description

All BOOST_CHECK_*, BOOST_REQUIRE_*, etc.. macros produce this warning under msvc8. A simple fix is to remove the const from the dummy_cond declaration in test_tools.hpp : namespace { bool dummy_cond = false; }

Thanks.

Change History (2)

comment:1 by Gennadiy Rozental, 13 years ago

Resolution: fixed
Status: newclosed

(In [53673]) Avoid warning. Fixes #2765

comment:2 by anonymous, 9 years ago

There is a warning on clang build

/home/wygos/libs/boost_1_55_0/include/boost/test/test_tools.hpp:309:18: warning: variable 'dummy_cond' is not needed and will not be emitted [-Wunneeded-internal-declaration] namespace { bool dummy_cond = false; }

clang version 3.3

Note: See TracTickets for help on using tickets.