This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
[PATCH] gold: quash unused-param warning in descriptors.cc
- From: Roland McGrath <mcgrathr at google dot com>
- To: binutils at sourceware dot org
- Date: Thu, 1 Nov 2012 11:44:13 -0700
- Subject: [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
}