Avoid using "do { ... } while ( wxFalse )" pseudo-loop.
authorVadim Zeitlin <vadim@wxwidgets.org>
Sun, 2 Dec 2012 23:48:36 +0000 (23:48 +0000)
committerVadim Zeitlin <vadim@wxwidgets.org>
Sun, 2 Dec 2012 23:48:36 +0000 (23:48 +0000)
commit4d3845c073617a5849cca7a0aa6b8ee889564b28
tree59b68f9275fc9a98579f39adfebd8a7e6d30d51d
parentaa29d293df42187e42aaa8b3cc5c0f74e8b2b604
Avoid using "do { ... } while ( wxFalse )" pseudo-loop.

This loop can't be optimized away by the compiler because wxFalse is an extern
variable which can't be known to be always false. Additionally, this creates
many false positives from Coverity as it assumes that the loop can be executed
more than once.

Define wxSTATEMENT_MACRO_BEGIN/END macros abstracting the exact solution used
and replace wxFalse with "(void)0, 0" for now as this seems to placate MSVC
(which warns about using a bare "0" as a condition) while still allowing the
loop to be completely optimized away.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@73101 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
include/wx/checkeddelete.h
include/wx/cpp.h
include/wx/strvararg.h