--- liba2ps/document.c.orig	2023-02-05 01:40:12.000000000 +0800
+++ liba2ps/document.c	2024-09-11 19:18:49.000000000 +0800
@@ -127,10 +127,7 @@
         }
       else
         fputs (between, stream);
-#pragma GCC diagnostic push
-#pragma GCC diagnostic ignored "-Wformat-nonliteral"
       fprintf (stream, author_fmt, author, email);
-#pragma GCC diagnostic pop
       cp = strtok (NULL, ",");
     }
   if (!first)
@@ -188,10 +185,7 @@
     return;
 
   char *cp = xvstrrpl (documentation, DOC_TO_PLAIN);
-#pragma GCC diagnostic push
-#pragma GCC diagnostic ignored "-Wformat-nonliteral"
   fprintf (stream, format, cp);
-#pragma GCC diagnostic pop
 }
 
 /* 2. Towards HTML */
@@ -203,10 +197,7 @@
     return;
 
   char *cp = xvstrrpl (documentation, DOC_TO_HTML);
-#pragma GCC diagnostic push
-#pragma GCC diagnostic ignored "-Wformat-nonliteral"
   fprintf (stream, format, cp);
-#pragma GCC diagnostic pop
 }
 
 /* 3. Towards Texinfo */
@@ -217,9 +208,6 @@
   if (!documentation)
     return;
 
-#pragma GCC diagnostic push
-#pragma GCC diagnostic ignored "-Wformat-nonliteral"
   char *cp = xvstrrpl (documentation, DOC_TO_TEXINFO);
   fprintf (stream, format, cp);
-#pragma GCC diagnostic pop
 }

--- liba2ps/dsc.c.orig	2022-06-12 04:35:11.000000000 +0800
+++ liba2ps/dsc.c	2024-09-11 19:19:05.000000000 +0800
@@ -187,10 +187,7 @@
    * 2. fewer sources of differences in regression tests */
   values = (char **) string_htable_dump_sorted (entry->entries);
   for (i = 0 ; values[i] ; i++) {
-#pragma GCC diagnostic push
-#pragma GCC diagnostic ignored "-Wformat-nonliteral"
     fprintf (stream, first ? fmt_first : fmt_others, entry->key, values[i]);
-#pragma GCC diagnostic pop
     first = false;
   }
 }

--- liba2ps/encoding.c.orig	2024-03-13 09:24:28.000000000 +0800
+++ liba2ps/encoding.c	2024-09-11 19:19:17.000000000 +0800
@@ -650,19 +650,13 @@
               /* Grow the obstack with the doc content */
               obstack_grow (&documentation_stack, buf2, read_length);
             }
-#pragma GCC diagnostic push
-#pragma GCC diagnostic ignored "-Wformat-nonliteral"
           if (!strprefix ("EndDocumentation", buf2))
             error (1, 0, fname, firstline,
                    _("missing argument for `%s'"), "`Documentation'");
-#pragma GCC diagnostic pop
           /* Finish the obstack, and store in the encoding entry */
           obstack_1grow (&documentation_stack, '\0');
-#pragma GCC diagnostic push
-#pragma GCC diagnostic ignored "-Wsign-conversion"
           documentation =
             (char *) obstack_finish (&documentation_stack);
-#pragma GCC diagnostic pop
           obstack_free (&documentation_stack, documentation);
           encoding->documentation = xstrdup (documentation);
         }

--- liba2ps/jobs.c.orig	2024-03-13 09:24:28.000000000 +0800
+++ liba2ps/jobs.c	2024-09-11 19:19:33.000000000 +0800
@@ -151,11 +151,8 @@
        paper != NULL;
        paper = papernext (paper))
     {
-#pragma GCC diagnostic push
-#pragma GCC diagnostic ignored "-Wfloat-conversion"
       int w = rint (paperpswidth (paper));
       int h = rint (paperpsheight (paper));
-#pragma GCC diagnostic pop
       add_medium_with_default_margin (res, papername (paper),
                                       (unsigned) w,
                                       (unsigned) h);

--- liba2ps/metaseq.c.orig	2022-06-12 05:22:04.000000000 +0800
+++ liba2ps/metaseq.c	2024-09-11 19:20:00.000000000 +0800
@@ -318,10 +318,7 @@
 			 context_name, "%D{}");
 
 		buf2[j] = '\0';
-#pragma GCC diagnostic push
-#pragma GCC diagnostic ignored "-Wformat-nonliteral"
 		strftime (buf, sizeof (buf), buf2, &job->run_tm);
-#pragma GCC diagnostic pop
 	      }
 	    else
 	      {
@@ -631,10 +628,7 @@
 			 context_name, "$D{}");
 
 		buf2[j] = '\0';
-#pragma GCC diagnostic push
-#pragma GCC diagnostic ignored "-Wformat-nonliteral"
 		strftime (buf, sizeof (buf), buf2, &(file->mod_tm));
-#pragma GCC diagnostic pop
 	      }
 	    else
 	      {
@@ -1306,10 +1300,7 @@
 			    job, file, context_name, str);
 
   obstack_1grow (&user_string_stack, '\0');
-#pragma GCC diagnostic push
-#pragma GCC diagnostic ignored "-Wsign-conversion"
   res = obstack_finish (&user_string_stack);
-#pragma GCC diagnostic pop
   obstack_free (&user_string_stack, res);
 
   message (msg_meta,

--- liba2ps/pathwalk.c.orig	2023-02-05 01:40:12.000000000 +0800
+++ liba2ps/pathwalk.c	2024-09-11 19:20:10.000000000 +0800
@@ -190,10 +190,7 @@
 {
   if (path)
     while (*path) {
-#pragma GCC diagnostic push
-#pragma GCC diagnostic ignored "-Wformat-nonliteral"
       fprintf (stream, format, *path);
-#pragma GCC diagnostic pop
       path++;
     }
 }

--- liba2ps/printers.c.orig	2022-06-12 04:35:11.000000000 +0800
+++ liba2ps/printers.c	2024-09-11 19:20:18.000000000 +0800
@@ -381,10 +381,7 @@
 		      ? _("saved into the file `%s'")
 		      : _("sent to the printer `%s'"));
       res = XNMALLOC (strlen (format) + strlen (name), char);
-#pragma GCC diagnostic push
-#pragma GCC diagnostic ignored "-Wformat-nonliteral"
       sprintf (res, format, name);
-#pragma GCC diagnostic pop
     }
   return res;
 }

--- liba2ps/prolog.c.orig	2024-03-13 09:24:28.000000000 +0800
+++ liba2ps/prolog.c	2024-09-11 19:20:48.000000000 +0800
@@ -103,10 +103,7 @@
   size_t bufsiz = 0;
   char buf2[BUFSIZ];
 
-#pragma GCC diagnostic push
-#pragma GCC diagnostic ignored "-Wformat-nonliteral"
   fprintf (stream, name_format, prologue_name);
-#pragma GCC diagnostic pop
 
   filename = xpw_find_file (job->common.path, prologue_name, PS_PROLOGUE_SUFFIX);
   fp = xrfopen (filename);
@@ -130,12 +127,9 @@
 		lastline++;
 	      (*documentation_fn) (buf2, "%s", stream);
 	    }
-#pragma GCC diagnostic push
-#pragma GCC diagnostic ignored "-Wformat-nonliteral"
 	  if (!strprefix (END_DOC_TAG, buf2))
 	    error (1, 0, filename, firstline,
 		   _("missing argument for `%s'"), "`Documentation'");
-#pragma GCC diagnostic pop
 	  done = true;
 	}
     }
@@ -178,11 +172,8 @@
 prologues_list_texinfo (a2ps_job * job, FILE * stream)
 {
   fputs ("@table @samp\n", stream);
-#pragma GCC diagnostic push
-#pragma GCC diagnostic ignored "-Wsuggest-attribute=format"
   prologues_list_long_internal (job, stream,
 				"@item %s\n", documentation_print_texinfo);
-#pragma GCC diagnostic pop
   fputs ("@end table\n", stream);
 }
 
--- liba2ps/routines.c.orig	2023-02-05 01:40:12.000000000 +0800
+++ liba2ps/routines.c	2024-09-11 19:21:07.000000000 +0800
@@ -116,11 +116,8 @@
   message (msg_file,
 	   (stderr, "%s-fopen (%s)\n", rights, quotearg (filename)));
   res = fopen (filename, rights);
-#pragma GCC diagnostic push
-#pragma GCC diagnostic ignored "-Wformat-nonliteral"
   if (!res)
     error (1, errno, format, quotearg (filename));
-#pragma GCC diagnostic pop
   return res;
 }
 
@@ -149,11 +146,8 @@
   message (msg_file,
 	   (stderr, "%s-popen (%s)\n", rights, filename));
   res = popen (filename, rights);
-#pragma GCC diagnostic push
-#pragma GCC diagnostic ignored "-Wformat-nonliteral"
   if (!res)
     error (1, errno, format, quotearg (filename));
-#pragma GCC diagnostic pop
   return res;
 }
 
--- src/buffer.c.orig	2022-06-12 03:51:44.000000000 +0800
+++ src/buffer.c	2024-09-11 19:21:42.000000000 +0800
@@ -396,10 +396,7 @@
      test on the length of the buffer. */
   buffer->len = obstack_object_size (&buffer->obstack);
   obstack_1grow (&buffer->obstack, '\0');
-#pragma GCC diagnostic push
-#pragma GCC diagnostic ignored "-Wsign-conversion"
   buffer->content = obstack_finish (&buffer->obstack);
-#pragma GCC diagnostic pop
 
   /* One more line read */
   buffer->line++;
