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

Roland McGrath mcgrathr@google.com
Thu Nov 1 18:44:00 GMT 2012


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
 }



More information about the Binutils mailing list