summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--include/manconfig.h.in14
-rw-r--r--lib/orderfiles.c3
-rw-r--r--lib/sandbox.c4
-rw-r--r--lib/security.c2
-rw-r--r--src/accessdb.c3
-rw-r--r--src/check_mandirs.c2
-rw-r--r--src/decompress.c2
-rw-r--r--src/lexgrog_test.c3
-rw-r--r--src/man.c9
-rw-r--r--src/manconv.c4
-rw-r--r--src/manp.c2
-rw-r--r--src/tests/fspause.c2
-rw-r--r--src/whatis.c3
-rw-r--r--src/zsoelim_main.c2
14 files changed, 18 insertions, 37 deletions
diff --git a/include/manconfig.h.in b/include/manconfig.h.in
index 9281f1c2..eaa4a943 100644
--- a/include/manconfig.h.in
+++ b/include/manconfig.h.in
@@ -254,20 +254,6 @@
# define ATTRIBUTE_FORMAT_PRINTF(a,b)
#endif
-/* Does this compiler support marking variables as unused? */
-#if GNUC_PREREQ(2,4)
-# define ATTRIBUTE_UNUSED __attribute__ ((__unused__))
-#else
-# define ATTRIBUTE_UNUSED
-#endif
-
-/* Does this compiler support malloc return checking? */
-#if GNUC_PREREQ(2,96)
-# define ATTRIBUTE_MALLOC __attribute__ ((__malloc__))
-#else
-# define ATTRIBUTE_MALLOC
-#endif
-
/* Does this compiler support unused result checking? */
#if GNUC_PREREQ(3,4)
# define ATTRIBUTE_WARN_UNUSED_RESULT __attribute__ ((__warn_unused_result__))
diff --git a/lib/orderfiles.c b/lib/orderfiles.c
index 0b3d18cb..4e91bb13 100644
--- a/lib/orderfiles.c
+++ b/lib/orderfiles.c
@@ -170,8 +170,7 @@ void order_files (const char *dir, gl_list_t *basenamesp)
close (dir_fd);
}
#else
-void order_files (const char *dir ATTRIBUTE_UNUSED,
- gl_list_t *basenamesp ATTRIBUTE_UNUSED)
+void order_files (const char *dir _GL_UNUSED, gl_list_t *basenamesp _GL_UNUSED)
{
}
#endif
diff --git a/lib/sandbox.c b/lib/sandbox.c
index 596805ab..21ec28aa 100644
--- a/lib/sandbox.c
+++ b/lib/sandbox.c
@@ -611,8 +611,8 @@ static void _sandbox_load (man_sandbox *sandbox, int permissive) {
}
}
#else /* !HAVE_LIBSECCOMP */
-static void _sandbox_load (man_sandbox *sandbox ATTRIBUTE_UNUSED,
- int permissive ATTRIBUTE_UNUSED)
+static void _sandbox_load (man_sandbox *sandbox _GL_UNUSED,
+ int permissive _GL_UNUSED)
{
}
#endif /* HAVE_LIBSECCOMP */
diff --git a/lib/security.c b/lib/security.c
index 7d66eaf4..d869c642 100644
--- a/lib/security.c
+++ b/lib/security.c
@@ -169,7 +169,7 @@ void regain_effective_privs (void)
}
/* Pipeline command pre-exec hook to permanently drop privileges. */
-void drop_privs (void *data ATTRIBUTE_UNUSED)
+void drop_privs (void *data _GL_UNUSED)
{
#ifdef MAN_OWNER
if (idpriv_drop ())
diff --git a/src/accessdb.c b/src/accessdb.c
index 5d25e377..dea5dd7a 100644
--- a/src/accessdb.c
+++ b/src/accessdb.c
@@ -87,8 +87,7 @@ static error_t parse_opt (int key, char *arg, struct argp_state *state)
return ARGP_ERR_UNKNOWN;
}
-static char *help_filter (int key, const char *text,
- void *input ATTRIBUTE_UNUSED)
+static char *help_filter (int key, const char *text, void *input _GL_UNUSED)
{
switch (key) {
case ARGP_KEY_HELP_PRE_DOC:
diff --git a/src/check_mandirs.c b/src/check_mandirs.c
index 08f7685b..9952b22b 100644
--- a/src/check_mandirs.c
+++ b/src/check_mandirs.c
@@ -379,7 +379,7 @@ void chown_if_possible (const char *path)
}
}
#else /* !MAN_OWNER */
-void chown_if_possible (const char *path ATTRIBUTE_UNUSED)
+void chown_if_possible (const char *path _GL_UNUSED)
{
}
#endif /* MAN_OWNER */
diff --git a/src/decompress.c b/src/decompress.c
index 15dda5b4..5cee5ff7 100644
--- a/src/decompress.c
+++ b/src/decompress.c
@@ -46,7 +46,7 @@
#ifdef HAVE_LIBZ
-static void decompress_zlib (void *data ATTRIBUTE_UNUSED)
+static void decompress_zlib (void *data _GL_UNUSED)
{
gzFile zlibfile;
int fd;
diff --git a/src/lexgrog_test.c b/src/lexgrog_test.c
index 4fb39fd1..189da43c 100644
--- a/src/lexgrog_test.c
+++ b/src/lexgrog_test.c
@@ -131,8 +131,7 @@ static error_t parse_opt (int key, char *arg, struct argp_state *state)
return ARGP_ERR_UNKNOWN;
}
-static char *help_filter (int key, const char *text,
- void *input ATTRIBUTE_UNUSED)
+static char *help_filter (int key, const char *text, void *input _GL_UNUSED)
{
switch (key) {
case ARGP_KEY_HELP_PRE_DOC:
diff --git a/src/man.c b/src/man.c
index a3aee5fc..08ecb15e 100644
--- a/src/man.c
+++ b/src/man.c
@@ -554,8 +554,7 @@ static error_t parse_opt (int key, char *arg, struct argp_state *state)
return ARGP_ERR_UNKNOWN;
}
-static char *help_filter (int key, const char *text,
- void *input ATTRIBUTE_UNUSED)
+static char *help_filter (int key, const char *text, void *input _GL_UNUSED)
{
#ifdef HAS_TROFF
# ifdef TROFF_IS_GROFF
@@ -1529,7 +1528,7 @@ static void add_output_iconv (pipeline *p,
/* Pipeline command to squeeze multiple blank lines into one.
*
*/
-static void squeeze_blank_lines (void *data ATTRIBUTE_UNUSED)
+static void squeeze_blank_lines (void *data _GL_UNUSED)
{
char *line = NULL;
size_t len = 0;
@@ -2040,7 +2039,7 @@ static void display_catman (const char *cat_file, pipeline *decomp,
free (tmpcat);
}
-static void disable_hyphenation (void *data ATTRIBUTE_UNUSED)
+static void disable_hyphenation (void *data _GL_UNUSED)
{
fputs (".nh\n"
".de hy\n"
@@ -2048,7 +2047,7 @@ static void disable_hyphenation (void *data ATTRIBUTE_UNUSED)
".lf 1\n", stdout);
}
-static void disable_justification (void *data ATTRIBUTE_UNUSED)
+static void disable_justification (void *data _GL_UNUSED)
{
fputs (".na\n"
".de ad\n"
diff --git a/src/manconv.c b/src/manconv.c
index 9759a28e..fbfa7619 100644
--- a/src/manconv.c
+++ b/src/manconv.c
@@ -336,8 +336,8 @@ void manconv (pipeline *p, char * const *from, const char *to)
/* If we don't have iconv, there isn't much we can do; just pass everything
* through unchanged.
*/
-void manconv (pipeline *p, char * const *from ATTRIBUTE_UNUSED,
- const char *to ATTRIBUTE_UNUSED)
+void manconv (pipeline *p, char * const *from _GL_UNUSED,
+ const char *to _GL_UNUSED)
{
for (;;) {
size_t len = 4096;
diff --git a/src/manp.c b/src/manp.c
index 1dfecf38..50d16b09 100644
--- a/src/manp.c
+++ b/src/manp.c
@@ -835,7 +835,7 @@ next:
free (buf);
}
-static void free_config_file (void *unused ATTRIBUTE_UNUSED)
+static void free_config_file (void *unused _GL_UNUSED)
{
gl_list_free (config);
}
diff --git a/src/tests/fspause.c b/src/tests/fspause.c
index 64a6e894..092fbb4f 100644
--- a/src/tests/fspause.c
+++ b/src/tests/fspause.c
@@ -84,7 +84,7 @@ static int try_delay (struct stat *st, int delay_ns)
return timespec_cmp (start_ts, end_ts) != 0;
}
-int main (int argc ATTRIBUTE_UNUSED, char **argv)
+int main (int argc _GL_UNUSED, char **argv)
{
struct stat st;
int delay_ns;
diff --git a/src/whatis.c b/src/whatis.c
index 78099358..8a89e80b 100644
--- a/src/whatis.c
+++ b/src/whatis.c
@@ -241,8 +241,7 @@ static error_t parse_opt (int key, char *arg, struct argp_state *state)
return ARGP_ERR_UNKNOWN;
}
-static char *help_filter (int key, const char *text,
- void *input ATTRIBUTE_UNUSED)
+static char *help_filter (int key, const char *text, void *input _GL_UNUSED)
{
switch (key) {
case ARGP_KEY_HELP_PRE_DOC:
diff --git a/src/zsoelim_main.c b/src/zsoelim_main.c
index da0b0fa0..063065d6 100644
--- a/src/zsoelim_main.c
+++ b/src/zsoelim_main.c
@@ -72,7 +72,7 @@ static struct argp_option options[] = {
{ 0 }
};
-static error_t parse_opt (int key, char *arg ATTRIBUTE_UNUSED,
+static error_t parse_opt (int key, char *arg _GL_UNUSED,
struct argp_state *state)
{
switch (key) {