]> granicus.if.org Git - gc/commitdiff
Eliminate 'unused result' compiler warning in main() of test_cpp
authorIvan Maidanski <ivmai@mail.ru>
Tue, 23 Oct 2012 03:28:36 +0000 (07:28 +0400)
committerIvan Maidanski <ivmai@mail.ru>
Tue, 23 Oct 2012 10:29:47 +0000 (14:29 +0400)
* tests/test_cpp.cc (main): Cast "b" local variable to void (to
outline that the result of new B(i) unused intentionally).

tests/test_cpp.cc

index 0da985bd871568c1afa365e7d0577b6ea3454488..ca42d2473a6c6bcbc961344781c6a0fd6b68448f 100644 (file)
@@ -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 );