This is the mail archive of the binutils@sourceware.org mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] gold: quash unused-param warning in descriptors.cc


On Thu, Nov 1, 2012 at 3:23 PM, Ian Lance Taylor <iant@google.com> wrote:
> No, use ATTRIBUTE_UNUSED.  See, e.g., mremap.c.

I was looking for a macro like that, but failed to find it because I was
grepping only inside gold/.

> That patch is preapproved.

Committed as follows.


Thanks,
Roland


gold/
2012-11-01  Roland McGrath  <mcgrathr@google.com>

	* descriptors.cc (set_close_on_exec): Add ATTRIBUTE_UNUSED to the
	parameter, which is unused in the [!F_SETFD] case.


diff --git a/gold/descriptors.cc b/gold/descriptors.cc
index 2ab0d5c..f3f071e 100644
--- a/gold/descriptors.cc
+++ b/gold/descriptors.cc
@@ -1,6 +1,6 @@
 // descriptors.cc -- manage file descriptors for gold

-// Copyright 2008, 2009, 2010, 2011 Free Software Foundation, Inc.
+// Copyright 2008, 2009, 2010, 2011, 2012 Free Software Foundation, Inc.
 // Written by Ian Lance Taylor <iant@google.com>.

 // This file is part of gold.
@@ -45,7 +45,7 @@
 #endif

 static inline void
-set_close_on_exec(int fd)
+set_close_on_exec(int fd ATTRIBUTE_UNUSED)
 {
 // Mingw does not define F_SETFD.
 #ifdef F_SETFD


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]