Hm, now idea how that happened. I have attached it again now.

On Mon, Nov 23, 2020 at 8:37 AM Paul Eggert <egg...@cs.ucla.edu> wrote:

> On 11/22/20 3:29 AM, Janos LENART wrote:
> > I have attached a patch that I am using now as a stop gap.
>
> Unfortunately that attachment was a binary file containing only 19 bytes.
>


-- 
LÉNÁRT, János
<o...@debian.org>
Index: tar.git/gnu/selinux-at.h
===================================================================
--- tar.git.orig/gnu/selinux-at.h	2020-11-20 16:59:39.604013293 +0000
+++ tar.git/gnu/selinux-at.h	2020-11-20 17:01:36.231448174 +0000
@@ -17,6 +17,9 @@
 #include <selinux/selinux.h>
 #include <selinux/context.h>
 
+_Pragma("GCC diagnostic push")
+_Pragma("GCC diagnostic ignored \"-Wdeprecated-declarations\"")
+
 /* These are the dir-fd-relative variants of the functions without the
    "at" suffix.  For example, getfileconat (AT_FDCWD, file, &c) is usually
    equivalent to getfilecon (file, &c).  The emulation is accomplished
@@ -50,3 +53,5 @@
    except when DIR_FD and FILE specify a symlink:  lsetfileconat operates on
    the symlink, while setfileconat operates on the referent of the symlink.  */
 int lsetfileconat (int dir_fd, char const *file, security_context_t con);
+
+_Pragma("GCC diagnostic pop")
Index: tar.git/lib/rtapelib.c
===================================================================
--- tar.git.orig/lib/rtapelib.c	2020-11-20 16:59:39.612013255 +0000
+++ tar.git/lib/rtapelib.c	2020-11-20 17:01:36.231448174 +0000
@@ -56,7 +56,10 @@
 #include <signal.h>
 
 #if HAVE_NETDB_H
+_Pragma("GCC diagnostic push")
+_Pragma("GCC diagnostic ignored \"-Wcast-align\"")
 # include <netdb.h>
+_Pragma("GCC diagnostic pop")
 #endif
 
 #include <rmt.h>
@@ -670,6 +673,8 @@
 #ifdef MTIOCTOP
     case MTIOCTOP:
       {
+        _Pragma("GCC diagnostic push")
+        _Pragma("GCC diagnostic ignored \"-Wcast-align\"")
 	char command_buffer[COMMAND_BUFFER_SIZE];
 	char operand_buffer[UINTMAX_STRSIZE_BOUND];
 	uintmax_t u = (((struct mtop *) argument)->mt_count < 0
@@ -692,6 +697,7 @@
 	  return -1;
 
 	return get_status (handle);
+        _Pragma("GCC diagnostic pop")
       }
 #endif /* MTIOCTOP */
 
@@ -732,8 +738,11 @@
 	   than 256, we will assume that the bytes are swapped and go through
 	   and reverse all the bytes.  */
 
+        _Pragma("GCC diagnostic push")
+        _Pragma("GCC diagnostic ignored \"-Wcast-align\"")
 	if (((struct mtget *) argument)->MTIO_CHECK_FIELD < 256)
 	  return 0;
+        _Pragma("GCC diagnostic pop")
 
 	for (counter = 0; counter < status; counter += 2)
 	  {
Index: tar.git/lib/wordsplit.c
===================================================================
--- tar.git.orig/lib/wordsplit.c	2020-11-20 16:59:39.612013255 +0000
+++ tar.git/lib/wordsplit.c	2020-11-20 17:01:36.231448174 +0000
@@ -439,7 +439,10 @@
 {
   if (p->flags & _WSNF_WORD)
     free (p->v.word);
+  _Pragma("GCC diagnostic push")
+  _Pragma("GCC diagnostic ignored \"-Wmaybe-uninitialized\"")
   free (p);
+  _Pragma("GCC diagnostic pop")
 }
 
 static void
@@ -535,9 +538,12 @@
   rc = wsnode_new (wsp, &node);
   if (rc)
     return rc;
+  _Pragma("GCC diagnostic push")
+  _Pragma("GCC diagnostic ignored \"-Wmaybe-uninitialized\"")
   node->flags = flg & ~(_WSNF_WORD | _WSNF_EMPTYOK);
   node->v.segm.beg = beg;
   node->v.segm.end = end;
+  _Pragma("GCC diagnostic pop")
   wsnode_append (wsp, node);
   return 0;
 }
@@ -924,7 +930,10 @@
       newnode->v.segm.end = newnode->v.segm.beg + len;
     }
   newnode->flags |= flg;
+  _Pragma("GCC diagnostic push")
+  _Pragma("GCC diagnostic ignored \"-Wmaybe-uninitialized\"")
   *ptail = newnode;
+  _Pragma("GCC diagnostic pop")
   return 0;
 }
 
@@ -1199,6 +1208,8 @@
 	return 1;
       wsnode_insert (wsp, newnode, *ptail, 0);
       *ptail = newnode;
+      _Pragma("GCC diagnostic push")
+      _Pragma("GCC diagnostic ignored \"-Wmaybe-uninitialized\"")
       newnode->flags = _WSNF_WORD | flg;
       newnode->v.word = malloc (3);
       if (!newnode->v.word)
@@ -1206,6 +1217,7 @@
       newnode->v.word[0] = '$';
       newnode->v.word[1] = str[0];
       newnode->v.word[2] = 0;
+      _Pragma("GCC diagnostic pop")
       *pend = str;
       return 0;
     }
@@ -1363,9 +1375,12 @@
 	      return 1;
 	    }
 	  wsnode_insert (wsp, newnode, *ptail, 0);
+         _Pragma("GCC diagnostic push")
+         _Pragma("GCC diagnostic ignored \"-Wmaybe-uninitialized\"")
 	  *ptail = newnode;
 	  newnode->flags = _WSNF_WORD | _WSNF_NOEXPAND | flg;
 	  newnode->v.word = value;
+         _Pragma("GCC diagnostic pop")
 	}
       else if (*value == 0)
 	{
@@ -1374,8 +1389,11 @@
 	  if (wsnode_new (wsp, &newnode))
 	    return 1;
 	  wsnode_insert (wsp, newnode, *ptail, 0);
+         _Pragma("GCC diagnostic push")
+         _Pragma("GCC diagnostic ignored \"-Wmaybe-uninitialized\"")
 	  *ptail = newnode;
 	  newnode->flags = _WSNF_NULL;
+         _Pragma("GCC diagnostic pop")
 	}
       else
 	{
@@ -1408,12 +1426,15 @@
 	return 1;
       wsnode_insert (wsp, newnode, *ptail, 0);
       *ptail = newnode;
+      _Pragma("GCC diagnostic push")
+      _Pragma("GCC diagnostic ignored \"-Wmaybe-uninitialized\"")
       newnode->flags = _WSNF_WORD | _WSNF_NOEXPAND | flg;
       newnode->v.word = malloc (size + 1);
       if (!newnode->v.word)
 	return _wsplt_nomem (wsp);
       memcpy (newnode->v.word, start, size);
       newnode->v.word[size] = 0;
+      _Pragma("GCC diagnostic pop")
     }
   else
     {
@@ -1421,7 +1442,10 @@
 	return 1;
       wsnode_insert (wsp, newnode, *ptail, 0);
       *ptail = newnode;
+      _Pragma("GCC diagnostic push")
+      _Pragma("GCC diagnostic ignored \"-Wmaybe-uninitialized\"")
       newnode->flags = _WSNF_NULL;
+      _Pragma("GCC diagnostic pop")
     }
   return 0;
 }
@@ -1589,8 +1613,11 @@
 	    return 1;
 	  wsnode_insert (wsp, newnode, *ptail, 0);
 	  *ptail = newnode;
+         _Pragma("GCC diagnostic push")
+         _Pragma("GCC diagnostic ignored \"-Wmaybe-uninitialized\"")
 	  newnode->flags = _WSNF_WORD | _WSNF_NOEXPAND | flg;
 	  newnode->v.word = value;
+         _Pragma("GCC diagnostic pop")
 	}
       else if (*value == 0)
 	{
@@ -1599,8 +1626,11 @@
 	  if (wsnode_new (wsp, &newnode))
 	    return 1;
 	  wsnode_insert (wsp, newnode, *ptail, 0);
+         _Pragma("GCC diagnostic push")
+         _Pragma("GCC diagnostic ignored \"-Wmaybe-uninitialized\"")
 	  *ptail = newnode;
 	  newnode->flags = _WSNF_NULL;
+         _Pragma("GCC diagnostic pop")
 	}
       else
 	{
@@ -1631,7 +1661,10 @@
 	return 1;
       wsnode_insert (wsp, newnode, *ptail, 0);
       *ptail = newnode;
+      _Pragma("GCC diagnostic push")
+      _Pragma("GCC diagnostic ignored \"-Wmaybe-uninitialized\"")
       newnode->flags = _WSNF_NULL;
+      _Pragma("GCC diagnostic pop")
     }
   return 0;
 }
@@ -1868,7 +1901,10 @@
 		}
 	      newnode->v.word = newstr;
 	      newnode->flags |= _WSNF_WORD|_WSNF_QUOTE;
+             _Pragma("GCC diagnostic push")
+             _Pragma("GCC diagnostic ignored \"-Wmaybe-uninitialized\"")
 	      wsnode_insert (wsp, newnode, prev, 0);
+             _Pragma("GCC diagnostic pop")
 	      prev = newnode;
 	    }
 	  globfree (&g);
Index: tar.git/src/buffer.c
===================================================================
--- tar.git.orig/src/buffer.c	2020-11-20 16:59:39.660013022 +0000
+++ tar.git/src/buffer.c	2020-11-20 17:01:36.231448174 +0000
@@ -1505,8 +1505,11 @@
       ASSIGN_STRING_N (&volume_label, current_header->header.name);
       set_next_block_after (header);
       header = find_next_block ();
+      _Pragma("GCC diagnostic push")
+      _Pragma("GCC diagnostic ignored \"-Wnull-dereference\"")
       if (header->header.typeflag != GNUTYPE_MULTIVOL)
         break;
+      _Pragma("GCC diagnostic pop")
       FALLTHROUGH;
     case GNUTYPE_MULTIVOL:
       if (!read_header0 (&dummy))
@@ -1695,7 +1698,10 @@
       current_stat_info.had_trailing_slash =
         strip_trailing_slashes (current_stat_info.file_name);
 
+      _Pragma("GCC diagnostic push")
+      _Pragma("GCC diagnostic ignored \"-Wnull-dereference\"")
       label->header.typeflag = GNUTYPE_VOLHDR;
+      _Pragma("GCC diagnostic pop")
       TIME_TO_CHARS (start_time.tv_sec, label->header.mtime);
       finish_header (&current_stat_info, label, -1);
       set_next_block_after (label);

Reply via email to