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]

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


Compiling gold on mingw32 gets an unused-parameter warning.  Fixed thusly.

Ok for trunk?


Thanks,
Roland


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

	* descriptors.cc (set_close_on_exec) [!F_SETFD]: Reference the
	parameter so it isn't diagnosed as unused.

diff --git a/gold/descriptors.cc b/gold/descriptors.cc
index 2ab0d5c..f737166 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.
@@ -50,6 +50,8 @@ set_close_on_exec(int fd)
 // Mingw does not define F_SETFD.
 #ifdef F_SETFD
   fcntl(fd, F_SETFD, FD_CLOEXEC);
+#else
+  (void) fd;
 #endif
 }


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