]> git.eshelyaron.com Git - emacs.git/commitdiff
Port pdumper.c maybe_unused to C2x
authorPaul Eggert <eggert@cs.ucla.edu>
Mon, 4 Oct 2021 00:45:20 +0000 (17:45 -0700)
committerPaul Eggert <eggert@cs.ucla.edu>
Mon, 4 Oct 2021 00:46:00 +0000 (17:46 -0700)
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

index 2291fced5d749af96b049145a0d26c6297e17526..11c680d77b71455ebe513f45afbe3746a73198e4 100644 (file)
@@ -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)
 {