summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorPaul Eggert <eggert@cs.ucla.edu>2021-10-03 20:04:09 -0700
committerPaul Eggert <eggert@cs.ucla.edu>2021-10-03 20:05:09 -0700
commitd00f3d4c05713254b3fec19601f6944442b956ff (patch)
treea7a680a2568877d56e70cfc579f9c5a6f0ea00d5 /src
parent317eb2d5b54e6c65a3bdcf2964d2b8d2232b4a13 (diff)
downloademacs-d00f3d4c05713254b3fec19601f6944442b956ff.tar.gz
Port unused decls to C2x
* src/conf_post.h (ATTRIBUTE_UNUSED): Remove. All uses replaced by MAYBE_UNUSED, and moved to start as needed for C2x.
Diffstat (limited to 'src')
-rw-r--r--src/conf_post.h1
-rw-r--r--src/process.c2
-rw-r--r--src/unexcw.c6
-rw-r--r--src/xterm.c2
4 files changed, 5 insertions, 6 deletions
diff --git a/src/conf_post.h b/src/conf_post.h
index 8558dc466cc..2c6fbb0dba5 100644
--- a/src/conf_post.h
+++ b/src/conf_post.h
@@ -293,7 +293,6 @@ extern int emacs_setenv_TZ (char const *);
ATTRIBUTE_FORMAT ((PRINTF_ARCHETYPE, string_index, first_to_check))
#define ARG_NONNULL ATTRIBUTE_NONNULL
-#define ATTRIBUTE_UNUSED MAYBE_UNUSED
/* Declare NAME to be a pointer to an object of type TYPE, initialized
to the address ADDR, which may be of a different type. Accesses
diff --git a/src/process.c b/src/process.c
index 58347a154a3..221d4c7f6c3 100644
--- a/src/process.c
+++ b/src/process.c
@@ -4004,7 +4004,7 @@ usage: (make-network-process &rest ARGS) */)
if (!NILP (host))
{
- ptrdiff_t portstringlen ATTRIBUTE_UNUSED;
+ MAYBE_UNUSED ptrdiff_t portstringlen;
/* SERVICE can either be a string or int.
Convert to a C string for later use by getaddrinfo. */
diff --git a/src/unexcw.c b/src/unexcw.c
index 7a80b05963b..157e9f45607 100644
--- a/src/unexcw.c
+++ b/src/unexcw.c
@@ -48,7 +48,7 @@ static exe_header_t *
read_exe_header (int fd, exe_header_t * exe_header_buffer)
{
int i;
- int ret ATTRIBUTE_UNUSED;
+ MAYBE_UNUSED int ret;
assert (fd >= 0);
assert (exe_header_buffer != 0);
@@ -111,7 +111,7 @@ fixup_executable (int fd)
exe_header_t exe_header_buffer;
exe_header_t *exe_header;
int i;
- int ret ATTRIBUTE_UNUSED;
+ MAYBE_UNUSED int ret;
int found_data = 0;
int found_bss = 0;
@@ -269,7 +269,7 @@ unexec (const char *outfile, const char *infile)
int fd_in;
int fd_out;
int ret;
- int ret2 ATTRIBUTE_UNUSED;
+ MAYBE_UNUSED int ret2;
infile = add_exe_suffix_if_necessary (infile, infile_buffer);
outfile = add_exe_suffix_if_necessary (outfile, outfile_buffer);
diff --git a/src/xterm.c b/src/xterm.c
index ae3af598da6..cf1e97a8b93 100644
--- a/src/xterm.c
+++ b/src/xterm.c
@@ -4049,7 +4049,7 @@ x_delete_glyphs (struct frame *f, int n)
/* Like XClearArea, but check that WIDTH and HEIGHT are reasonable.
If they are <= 0, this is probably an error. */
-static ATTRIBUTE_UNUSED void
+MAYBE_UNUSED static void
x_clear_area1 (Display *dpy, Window window,
int x, int y, int width, int height, int exposures)
{