From: Ivan Maidanski Date: Tue, 23 Oct 2012 03:28:36 +0000 (+0400) Subject: Eliminate 'unused result' compiler warning in main() of test_cpp X-Git-Tag: gc7_4_0~183 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=6f3b05d3fbd3617c70c4e49aa2560336cdd2cae4;p=gc Eliminate 'unused result' compiler warning in main() of test_cpp * tests/test_cpp.cc (main): Cast "b" local variable to void (to outline that the result of new B(i) unused intentionally). --- diff --git a/tests/test_cpp.cc b/tests/test_cpp.cc index 0da985bd..ca42d247 100644 --- a/tests/test_cpp.cc +++ b/tests/test_cpp.cc @@ -267,7 +267,9 @@ int APIENTRY WinMain( HINSTANCE instance ATTR_UNUSED, A* a; a = new (USE_GC) A( i ); (void)a; - B* b = new B( i ); + B* b; + b = new B( i ); + (void)b; b = new (USE_GC) B( i ); if (0 == i % 10) { B::Deleting( 1 );