From 2a00634880adb20071686906ebb183326f2060e0 Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Sun, 3 Oct 2021 17:45:20 -0700 Subject: [PATCH] Port pdumper.c maybe_unused to C2x MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Port pdumper.c to C2x, and pacify gcc 11.2.1 -Wattributes -Wunused. * src/pdumper.c (dump_tailq_prepend): Omit ATTRIBUTE_UNUSED, since it’s always used. (dump_tailq_append): Remove; unused. --- src/pdumper.c | 20 +------------------- 1 file changed, 1 insertion(+), 19 deletions(-) diff --git a/src/pdumper.c b/src/pdumper.c index 2291fced5d7..11c680d77b7 100644 --- a/src/pdumper.c +++ b/src/pdumper.c @@ -799,7 +799,7 @@ dump_tailq_length (const struct dump_tailq *tailq) return tailq->length; } -static void ATTRIBUTE_UNUSED +static void dump_tailq_prepend (struct dump_tailq *tailq, Lisp_Object value) { Lisp_Object link = Fcons (value, tailq->head); @@ -809,24 +809,6 @@ dump_tailq_prepend (struct dump_tailq *tailq, Lisp_Object value) tailq->length += 1; } -static void ATTRIBUTE_UNUSED -dump_tailq_append (struct dump_tailq *tailq, Lisp_Object value) -{ - Lisp_Object link = Fcons (value, Qnil); - if (NILP (tailq->head)) - { - eassert (NILP (tailq->tail)); - tailq->head = tailq->tail = link; - } - else - { - eassert (!NILP (tailq->tail)); - XSETCDR (tailq->tail, link); - tailq->tail = link; - } - tailq->length += 1; -} - static bool dump_tailq_empty_p (struct dump_tailq *tailq) { -- 2.39.5