From 9d32bc784201ac187346d9ac0607a32b42dc8a77 Mon Sep 17 00:00:00 2001 From: Ivan Maidanski Date: Mon, 25 Jun 2018 07:00:21 +0300 Subject: [PATCH] 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)". --- tests/test_cpp.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/test_cpp.cc b/tests/test_cpp.cc index 840442f..43f034b 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) -- 2.7.4