From: Ivan Maidanski Date: Mon, 25 Jun 2018 04:00:21 +0000 (+0300) Subject: Workaround 'condition is always false' VC++ warning in test_cpp X-Git-Tag: v8.0.0~95 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=9d32bc784201ac187346d9ac0607a32b42dc8a77;p=gc Workaround 'condition is always false' VC++ warning in test_cpp (fix of commit 5524a425d) * tests/test_cpp.cc (GC_CHECKED_DELETE): Remove "do" and "while (0)". --- diff --git a/tests/test_cpp.cc b/tests/test_cpp.cc index 840442f8..43f034b9 100644 --- a/tests/test_cpp.cc +++ b/tests/test_cpp.cc @@ -238,12 +238,12 @@ void* Undisguise( GC_word i ) { return (void*) ~ i;} #define GC_CHECKED_DELETE(p) \ - do { \ + { \ size_t freed_before = GC_get_expl_freed_bytes_since_gc(); \ delete p; /* the operator should invoke GC_FREE() */ \ size_t freed_after = GC_get_expl_freed_bytes_since_gc(); \ my_assert(freed_before != freed_after); \ - } while (0) + } #if ((defined(MSWIN32) && !defined(__MINGW32__)) || defined(MSWINCE)) \ && !defined(NO_WINMAIN_ENTRY)