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.
37 lines
291 B
C++
37 lines
291 B
C++
namespace A
|
|
{
|
|
namespace B
|
|
{
|
|
int ab = 11;
|
|
}
|
|
}
|
|
|
|
namespace C
|
|
{
|
|
namespace D
|
|
{
|
|
using namespace A::B;
|
|
|
|
int
|
|
second()
|
|
{
|
|
(void) ab;
|
|
return 0;
|
|
}
|
|
}
|
|
|
|
int
|
|
first()
|
|
{
|
|
//ab;
|
|
return D::second();
|
|
}
|
|
}
|
|
|
|
int
|
|
main()
|
|
{
|
|
//ab;
|
|
return C::first();
|
|
}
|