emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

emacs-28 2a00634: Port pdumper.c maybe_unused to C2x


From: Paul Eggert
Subject: emacs-28 2a00634: Port pdumper.c maybe_unused to C2x
Date: Sun, 3 Oct 2021 20:46:05 -0400 (EDT)

branch: emacs-28
commit 2a00634880adb20071686906ebb183326f2060e0
Author: Paul Eggert <eggert@cs.ucla.edu>
Commit: Paul Eggert <eggert@cs.ucla.edu>

    Port pdumper.c maybe_unused to C2x
    
    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 2291fce..11c680d 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)
 {



reply via email to

[Prev in Thread] Current Thread [Next in Thread]