aboutsummaryrefslogtreecommitdiff
path: root/gdb/testsuite/gdb.cp/nsusing.cc
diff options
context:
space:
mode:
authorGary Benson <gbenson@redhat.com>2020-06-23 15:11:27 +0100
committerGary Benson <gbenson@redhat.com>2020-06-23 15:11:27 +0100
commit7e4b9c4cd3b83be4c52eb475a6ef6b3fa4946cc5 (patch)
treefb62f897dfad0df116835b33a89e8b0e9bb05cb8 /gdb/testsuite/gdb.cp/nsusing.cc
parent80fda85ca18ee287c826a90b09c5cb8e20fd4d54 (diff)
downloadbinutils-7e4b9c4cd3b83be4c52eb475a6ef6b3fa4946cc5.zip
binutils-7e4b9c4cd3b83be4c52eb475a6ef6b3fa4946cc5.tar.gz
binutils-7e4b9c4cd3b83be4c52eb475a6ef6b3fa4946cc5.tar.bz2
Improve -Wunused-value testcase build failures fix
This commit improves upon my previous -Wunused-value fix by replacing the various dummy variables with casts to void, as suggested by Pedro. gdb/testsuite/ChangeLog: * gdb.cp/namespace.cc: Improve -Wunused-value fix. * gdb.cp/nsimport.cc: Likewise. * gdb.cp/nsnested.cc: Likewise. * gdb.cp/nsnoimports.cc: Likewise. * gdb.cp/nsusing.cc: Likewise. * gdb.cp/smartp.cc: Likewise. * gdb.python/py-pp-integral.c: Likewise. * gdb.python/py-pp-re-notag.c: Likewise.
Diffstat (limited to 'gdb/testsuite/gdb.cp/nsusing.cc')
-rw-r--r--gdb/testsuite/gdb.cp/nsusing.cc12
1 files changed, 6 insertions, 6 deletions
diff --git a/gdb/testsuite/gdb.cp/nsusing.cc b/gdb/testsuite/gdb.cp/nsusing.cc
index 980a91a..fa5c9d0 100644
--- a/gdb/testsuite/gdb.cp/nsusing.cc
+++ b/gdb/testsuite/gdb.cp/nsusing.cc
@@ -35,7 +35,7 @@ namespace L
using namespace J;
int marker8 ()
{
- int unused = jx;
+ (void) jx;
return K::marker9 ();
}
}
@@ -53,7 +53,7 @@ namespace I
int marker7 ()
{
using namespace G::H;
- int unused = ghx;
+ (void) ghx;
return L::marker8 ();
}
}
@@ -69,7 +69,7 @@ namespace E
using namespace E::F;
int marker6 ()
{
- int unused = efx;
+ (void) efx;
return I::marker7 ();
}
@@ -92,7 +92,7 @@ namespace D
using namespace C;
int marker5 ()
{
- int unused = cc;
+ (void) cc;
return marker6 ();
}
@@ -110,7 +110,7 @@ int marker3 ()
int marker2 ()
{
namespace B = A;
- int unused = B::_a;
+ (void) B::_a;
return marker3 ();
}
@@ -134,6 +134,6 @@ int marker1 ()
int main ()
{
using namespace A;
- int unused = _a;
+ (void) _a;
return marker1 ();
}