summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lib/orderfiles.c4
-rw-r--r--lib/sandbox.c9
-rw-r--r--lib/security.c2
-rw-r--r--libdb/db_ndbm.c3
-rw-r--r--src/accessdb.c3
-rw-r--r--src/check_mandirs.c3
-rw-r--r--src/convert.c4
-rw-r--r--src/decompress.c3
-rw-r--r--src/lexgrog_test.c3
-rw-r--r--src/man.c9
-rw-r--r--src/manconv.c5
-rw-r--r--src/manp.c2
-rw-r--r--src/tests/fspause.c3
-rw-r--r--src/whatis.c2
-rw-r--r--src/zsoelim_main.c3
15 files changed, 36 insertions, 22 deletions
diff --git a/lib/orderfiles.c b/lib/orderfiles.c
index 75a3ad70..361b19f7 100644
--- a/lib/orderfiles.c
+++ b/lib/orderfiles.c
@@ -44,6 +44,7 @@
#include <string.h>
#include <unistd.h>
+#include "attribute.h"
#include "gl_hash_map.h"
#include "gl_rbtree_list.h"
#include "gl_xlist.h"
@@ -171,7 +172,8 @@ void order_files (const char *dir, gl_list_t *basenamesp)
close (dir_fd);
}
#else
-void order_files (const char *dir _GL_UNUSED, gl_list_t *basenamesp _GL_UNUSED)
+void order_files (const char *dir MAYBE_UNUSED,
+ gl_list_t *basenamesp MAYBE_UNUSED)
{
}
#endif
diff --git a/lib/sandbox.c b/lib/sandbox.c
index d3186561..ff211ac8 100644
--- a/lib/sandbox.c
+++ b/lib/sandbox.c
@@ -63,10 +63,11 @@
# include <seccomp.h>
#endif /* HAVE_LIBSECCOMP */
-#include "manconfig.h"
-
+#include "attribute.h"
#include "error.h"
+#include "manconfig.h"
+
#include "sandbox.h"
struct man_sandbox {
@@ -623,8 +624,8 @@ static void _sandbox_load (man_sandbox *sandbox, int permissive) {
}
}
#else /* !HAVE_LIBSECCOMP */
-static void _sandbox_load (man_sandbox *sandbox _GL_UNUSED,
- int permissive _GL_UNUSED)
+static void _sandbox_load (man_sandbox *sandbox MAYBE_UNUSED,
+ int permissive MAYBE_UNUSED)
{
}
#endif /* HAVE_LIBSECCOMP */
diff --git a/lib/security.c b/lib/security.c
index dd37af12..39dcc269 100644
--- a/lib/security.c
+++ b/lib/security.c
@@ -170,7 +170,7 @@ void regain_effective_privs (void)
}
/* Pipeline command pre-exec hook to permanently drop privileges. */
-void drop_privs (void *data _GL_UNUSED)
+void drop_privs (void *data MAYBE_UNUSED)
{
#ifdef MAN_OWNER
if (idpriv_drop ())
diff --git a/libdb/db_ndbm.c b/libdb/db_ndbm.c
index 64000c1c..57c26e83 100644
--- a/libdb/db_ndbm.c
+++ b/libdb/db_ndbm.c
@@ -35,6 +35,7 @@
#include <sys/types.h> /* for open() */
#include <sys/stat.h>
+#include "attribute.h"
#include "stat-time.h"
#include "timespec.h"
#include "xvasprintf.h"
@@ -123,7 +124,7 @@ static datum unsorted_firstkey (man_ndbm_wrapper wrap)
return copy_datum (dbm_firstkey (wrap->file));
}
-static datum unsorted_nextkey (man_ndbm_wrapper wrap, datum key _GL_UNUSED)
+static datum unsorted_nextkey (man_ndbm_wrapper wrap, datum key MAYBE_UNUSED)
{
return copy_datum (dbm_nextkey (wrap->file));
}
diff --git a/src/accessdb.c b/src/accessdb.c
index c0910196..dec144bd 100644
--- a/src/accessdb.c
+++ b/src/accessdb.c
@@ -35,6 +35,7 @@
#include <assert.h>
#include "argp.h"
+#include "attribute.h"
#include "progname.h"
#include "xvasprintf.h"
@@ -90,7 +91,7 @@ static error_t parse_opt (int key, char *arg, struct argp_state *state)
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wformat-nonliteral"
-static char *help_filter (int key, const char *text, void *input _GL_UNUSED)
+static char *help_filter (int key, const char *text, void *input MAYBE_UNUSED)
{
switch (key) {
case ARGP_KEY_HELP_PRE_DOC:
diff --git a/src/check_mandirs.c b/src/check_mandirs.c
index 77aa9694..6076f911 100644
--- a/src/check_mandirs.c
+++ b/src/check_mandirs.c
@@ -44,6 +44,7 @@
#include <dirent.h>
#include <unistd.h>
+#include "attribute.h"
#include "dirname.h"
#include "gl_array_list.h"
#include "gl_hash_map.h"
@@ -393,7 +394,7 @@ void chown_if_possible (const char *path)
}
}
#else /* !MAN_OWNER */
-void chown_if_possible (const char *path _GL_UNUSED)
+void chown_if_possible (const char *path MAYBE_UNUSED)
{
}
#endif /* MAN_OWNER */
diff --git a/src/convert.c b/src/convert.c
index 2649e9eb..b21209fe 100644
--- a/src/convert.c
+++ b/src/convert.c
@@ -32,6 +32,8 @@
# include <iconv.h>
#endif /* HAVE_ICONV */
+#include "attribute.h"
+
#include "manconfig.h"
#include "cleanup.h"
@@ -43,7 +45,7 @@
static bool conv_to_locale_initialized = false;
static iconv_t conv_to_locale = (iconv_t) -1;
-static void close_conv_to_locale (void *ignored _GL_UNUSED)
+static void close_conv_to_locale (void *ignored MAYBE_UNUSED)
{
iconv_close (conv_to_locale);
}
diff --git a/src/decompress.c b/src/decompress.c
index 5cee5ff7..df2914c0 100644
--- a/src/decompress.c
+++ b/src/decompress.c
@@ -36,6 +36,7 @@
# include "zlib.h"
#endif /* HAVE_LIBZ */
+#include "attribute.h"
#include "xvasprintf.h"
#include "manconfig.h"
@@ -46,7 +47,7 @@
#ifdef HAVE_LIBZ
-static void decompress_zlib (void *data _GL_UNUSED)
+static void decompress_zlib (void *data MAYBE_UNUSED)
{
gzFile zlibfile;
int fd;
diff --git a/src/lexgrog_test.c b/src/lexgrog_test.c
index 77c9a134..fec69ec3 100644
--- a/src/lexgrog_test.c
+++ b/src/lexgrog_test.c
@@ -34,6 +34,7 @@
#include <sys/stat.h>
#include "argp.h"
+#include "attribute.h"
#include "error.h"
#include "gl_list.h"
#include "progname.h"
@@ -132,7 +133,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 _GL_UNUSED)
+static char *help_filter (int key, const char *text, void *input MAYBE_UNUSED)
{
switch (key) {
case ARGP_KEY_HELP_PRE_DOC:
diff --git a/src/man.c b/src/man.c
index b15c90a1..63c436d5 100644
--- a/src/man.c
+++ b/src/man.c
@@ -58,6 +58,7 @@
#include <sys/stat.h>
#include "argp.h"
+#include "attribute.h"
#include "dirname.h"
#include "gl_array_list.h"
#include "gl_hash_map.h"
@@ -553,7 +554,7 @@ static error_t parse_opt (int key, char *arg, struct argp_state *state)
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wformat-nonliteral"
-static char *help_filter (int key, const char *text, void *input _GL_UNUSED)
+static char *help_filter (int key, const char *text, void *input MAYBE_UNUSED)
{
#ifdef HAS_TROFF
# ifdef TROFF_IS_GROFF
@@ -1542,7 +1543,7 @@ static void add_output_iconv (pipeline *p,
/* Pipeline command to squeeze multiple blank lines into one.
*
*/
-static void squeeze_blank_lines (void *data _GL_UNUSED)
+static void squeeze_blank_lines (void *data MAYBE_UNUSED)
{
char *line = NULL;
size_t len = 0;
@@ -2065,7 +2066,7 @@ static void display_catman (const char *cat_file, pipeline *decomp,
free (tmpcat);
}
-static void disable_hyphenation (void *data _GL_UNUSED)
+static void disable_hyphenation (void *data MAYBE_UNUSED)
{
fputs (".nh\n"
".de hy\n"
@@ -2073,7 +2074,7 @@ static void disable_hyphenation (void *data _GL_UNUSED)
".lf 1\n", stdout);
}
-static void disable_justification (void *data _GL_UNUSED)
+static void disable_justification (void *data MAYBE_UNUSED)
{
fputs (".na\n"
".de ad\n"
diff --git a/src/manconv.c b/src/manconv.c
index 4b06398f..8ed994d0 100644
--- a/src/manconv.c
+++ b/src/manconv.c
@@ -46,6 +46,7 @@
#endif /* HAVE_ICONV */
#include "argp.h"
+#include "attribute.h"
#include "gl_list.h"
#include "gettext.h"
@@ -354,8 +355,8 @@ void manconv (pipeline *p, gl_list_t 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, gl_list_t from _GL_UNUSED,
- const char *to _GL_UNUSED)
+void manconv (pipeline *p, gl_list_t from MAYBE_UNUSED,
+ const char *to MAYBE_UNUSED)
{
for (;;) {
size_t len = 4096;
diff --git a/src/manp.c b/src/manp.c
index e252c25c..6a8ddce1 100644
--- a/src/manp.c
+++ b/src/manp.c
@@ -808,7 +808,7 @@ next:
free (buf);
}
-static void free_config_file (void *unused _GL_UNUSED)
+static void free_config_file (void *unused MAYBE_UNUSED)
{
gl_list_free (config);
}
diff --git a/src/tests/fspause.c b/src/tests/fspause.c
index 092fbb4f..4f573c62 100644
--- a/src/tests/fspause.c
+++ b/src/tests/fspause.c
@@ -32,6 +32,7 @@
#include <time.h>
#include <unistd.h>
+#include "attribute.h"
#include "progname.h"
#include "stat-time.h"
#include "timespec.h"
@@ -84,7 +85,7 @@ static int try_delay (struct stat *st, int delay_ns)
return timespec_cmp (start_ts, end_ts) != 0;
}
-int main (int argc _GL_UNUSED, char **argv)
+int main (int argc MAYBE_UNUSED, char **argv)
{
struct stat st;
int delay_ns;
diff --git a/src/whatis.c b/src/whatis.c
index 4c153c05..cda72e03 100644
--- a/src/whatis.c
+++ b/src/whatis.c
@@ -236,7 +236,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 _GL_UNUSED)
+static char *help_filter (int key, const char *text, void *input MAYBE_UNUSED)
{
switch (key) {
case ARGP_KEY_HELP_PRE_DOC:
diff --git a/src/zsoelim_main.c b/src/zsoelim_main.c
index 856997ef..20f02a6a 100644
--- a/src/zsoelim_main.c
+++ b/src/zsoelim_main.c
@@ -31,6 +31,7 @@
#include <stdlib.h>
#include "argp.h"
+#include "attribute.h"
#include "gl_list.h"
#include "progname.h"
#include "xvasprintf.h"
@@ -71,7 +72,7 @@ static struct argp_option options[] = {
{ 0 }
};
-static error_t parse_opt (int key, char *arg _GL_UNUSED,
+static error_t parse_opt (int key, char *arg MAYBE_UNUSED,
struct argp_state *state)
{
switch (key) {