[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
FYI: maint: s/UNUSED/_GL_UNUSED/
From: |
Jim Meyering |
Subject: |
FYI: maint: s/UNUSED/_GL_UNUSED/ |
Date: |
Fri, 23 Mar 2018 13:59:12 -0700 |
I noticed that sed defined its own UNUSED macro.
It's better to use gnulib's _GL_UNUSED:
> From 290c59315b093ed812d6c5f25c570c73e0e4996c Mon Sep 17 00:00:00 2001
From: Jim Meyering <address@hidden>
Date: Fri, 23 Mar 2018 13:26:54 -0700
Subject: [PATCH] maint: remove old definition of UNUSED: use _GL_UNUSED
instead
* sed/execute.c (UNUSED): Remove macro definition.
(read_always_fail): Use _GL_UNUSED instead.
---
sed/execute.c | 12 +-----------
1 file changed, 1 insertion(+), 11 deletions(-)
diff --git a/sed/execute.c b/sed/execute.c
index 453886e..2804c5e 100644
--- a/sed/execute.c
+++ b/sed/execute.c
@@ -37,16 +37,6 @@
#include "acl.h"
#include "ignore-value.h"
-#ifdef __GNUC__
-# if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__-0 >= 7)
- /* silence warning about unused parameter even for "gcc -W -Wunused" */
-# define UNUSED __attribute__((unused))
-# endif
-#endif
-#ifndef UNUSED
-# define UNUSED
-#endif
-
/* The number of extra bytes that must be allocated/usable, beyond
the declared "end" of each line buffer that may be passed to
match_regex. This is imposed by its use of dfaexec. */
@@ -386,7 +376,7 @@ line_exchange (struct line *a, struct line *b, int state)
/* dummy function to simplify read_pattern_space() */
static bool
-read_always_fail(struct input *input UNUSED)
+read_always_fail(struct input *input _GL_UNUSED)
{
return false;
}
--
2.13.5
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- FYI: maint: s/UNUSED/_GL_UNUSED/,
Jim Meyering <=