chg: silence warning of unused parameter 'sig'
author |
Yuya Nishihara <yuya@tcha.org> |
date |
Tue, 28 Jun 2016 22:39:06 +0900 |
parents |
c42a3fd5c1fc |
children |
9e8d258708bb |
files |
contrib/chg/chg.c contrib/chg/util.h |
diffstat |
2 files changed, 3 insertions(+), 1 deletions(-)
[+]
|
line diff
--- a/contrib/chg/chg.c
+++ b/contrib/chg/chg.c
@@ -381,7 +381,7 @@
abortmsgerrno("failed to handle stop signal");
}
-static void handlechildsignal(int sig)
+static void handlechildsignal(int sig UNUSED_)
{
if (peerpid == 0 || pagerpid == 0)
return;
--- a/contrib/chg/util.h
+++ b/contrib/chg/util.h
@@ -12,8 +12,10 @@
#ifdef __GNUC__
#define PRINTF_FORMAT_ __attribute__((format(printf, 1, 2)))
+#define UNUSED_ __attribute__((unused))
#else
#define PRINTF_FORMAT_
+#define UNUSED_
#endif
void abortmsg(const char *fmt, ...) PRINTF_FORMAT_;