This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
[PATCH] gold testsuite: avoid unused private member in undef_symbol.cc
- From: Roland McGrath <mcgrathr at google dot com>
- To: "binutils at sourceware dot org" <binutils at sourceware dot org>
- Date: Fri, 11 Oct 2013 13:28:33 -0700
- Subject: [PATCH] gold testsuite: avoid unused private member in undef_symbol.cc
- Authentication-results: sourceware.org; auth=none
I'm not sure why this test wasn't just "int foo(void) { return a; }"
anyway. But this is the minimal change to the status quo that suppresses
the warning about an unused member.
OK for trunk and 2.24?
Thanks,
Roland
gold/
* testsuite/undef_symbol.cc (Foo::get_a): New method.
--- a/gold/testsuite/undef_symbol.cc
+++ b/gold/testsuite/undef_symbol.cc
@@ -1,6 +1,6 @@
// undef_symbol.cc -- a test case for undefined references
-// Copyright 2007, 2008 Free Software Foundation, Inc.
+// Copyright 2007, 2008, 2013 Free Software Foundation, Inc.
// Written by Ian Lance Taylor <iant@google.com>.
// This file is part of gold.
@@ -31,6 +31,8 @@ class Foo
Foo()
: a_(a)
{ }
+ int get_a()
+ { return a_; }
private:
int a_;
};