From df8f2943cd9d775ade90481c62d6565fbab0710b Mon Sep 17 00:00:00 2001 From: Colin Watson Date: Sat, 24 Aug 2019 00:28:08 +0100 Subject: Simplify some GCC attribute handling * lib/orderfiles.c (order_files) [!HAVE_LINUX_FIEMAP_H && !HAVE_POSIX_FADVISE]: Use _GL_UNUSED rather than ATTRIBUTE_UNUSED. * lib/sandbox.c (_sandbox_load) [!HAVE_LIBSECCOMP]: Likewise. * lib/security.c (drop_privs): Likewise. * src/accessdb.c (help_filter): Likewise. * src/check_mandirs.c (chown_if_possible): Likewise. * src/decompress.c (decompress_zlib): Likewise. * src/lexgrog_test.c (help_filter): Likewise. * src/man.c (help_filter, squeeze_blank_lines, disable_hyphenation, disable_justification): Likewise. * src/manconv.c (manconv): Likewise. * src/manp.c (free_config_file): Likewise. * src/tests/fspause.c (main): Likewise. * src/whatis.c (help_filter): Likewise. * src/zsoelim_main.c (parse_opt): Likewise. * include/manconfig.h.in (ATTRIBUTE_UNUSED): Remove in favour of the shorter _GL_UNUSED. (ATTRIBUTE_MALLOC): Remove; it was unused. --- include/manconfig.h.in | 14 -------------- 1 file changed, 14 deletions(-) (limited to 'include') 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__)) -- cgit v1.2.3