mirror of
https://sourceware.org/git/binutils-gdb.git
synced 2024-12-27 04:52:05 +08:00
7e4b9c4cd3
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.
38 lines
367 B
C++
38 lines
367 B
C++
|
|
namespace A
|
|
{
|
|
int _a = 11;
|
|
|
|
namespace B{
|
|
|
|
int ab = 22;
|
|
|
|
namespace C{
|
|
|
|
int abc = 33;
|
|
|
|
int second(){
|
|
return 0;
|
|
}
|
|
|
|
}
|
|
|
|
int first(){
|
|
(void) _a;
|
|
(void) ab;
|
|
(void) C::abc;
|
|
return C::second();
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
int
|
|
main()
|
|
{
|
|
(void) A::_a;
|
|
(void) A::B::ab;
|
|
(void) A::B::C::abc;
|
|
return A::B::first();
|
|
}
|