diff options
author | Ivan Maidanski <ivmai@mail.ru> | 2022-08-12 22:49:03 +0300 |
---|---|---|
committer | Ivan Maidanski <ivmai@mail.ru> | 2022-08-12 22:49:03 +0300 |
commit | e1aaa10017384f37429cea9a6293a2bece94eb9a (patch) | |
tree | 539fb8936573c0643371acd5921a75be1b4c79c9 /tests/cpp.cc | |
parent | 84d0c286416c06df8200d2976a38aaea70a0eb79 (diff) | |
download | bdwgc-e1aaa10017384f37429cea9a6293a2bece94eb9a.tar.gz |
Eliminate 'unused but set variable' gcc warning in cpptest
(fix of commit e870802a1)
* tests/cpp.cc (main): Pass xio, d, a local variables to
GC_reachable_here().
Diffstat (limited to 'tests/cpp.cc')
-rw-r--r-- | tests/cpp.cc | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/tests/cpp.cc b/tests/cpp.cc index dc0c9929..040df4ef 100644 --- a/tests/cpp.cc +++ b/tests/cpp.cc @@ -314,7 +314,7 @@ void* Undisguise( GC_word i ) { int *x = gc_allocator<int>().allocate(1); int *xio; xio = gc_allocator_ignore_off_page<int>().allocate(1); - (void)xio; + GC_reachable_here(xio); int **xptr = traceable_allocator<int *>().allocate(1); *x = 29; if (!xptr) { @@ -353,7 +353,7 @@ void* Undisguise( GC_word i ) { D* d; F* f; d = ::new (USE_GC, D::CleanUp, (void*)(GC_word)i) D( i ); - (void)d; + GC_reachable_here(d); f = new F; F** fa = new F*[1]; fa[0] = f; @@ -369,7 +369,7 @@ void* Undisguise( GC_word i ) { for (i = 0; i < 1000000; i++) { A* a; a = new (USE_GC) A( i ); - (void)a; + GC_reachable_here(a); B* b; b = new B( i ); (void)b; |