bug-tar
[Top][All Lists]
Advanced

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

[Bug-tar] avoid a few more warnings


From: Jim Meyering
Subject: [Bug-tar] avoid a few more warnings
Date: Thu, 18 Oct 2007 09:15:10 +0200

Here's a patch to avoid a few more compiler warnings:

        Avoid compiler warnings.
        * src/list.c (read_header_primitive): Define two locals, to
        avoid incorrect "may be used uninitialized" warnings.
        * src/incremen.c (procdir): Remove decl of unused local, "len".

Index: src/list.c
===================================================================
RCS file: /cvsroot/tar/tar/src/list.c,v
retrieving revision 1.106
diff -u -p -r1.106 list.c
--- src/list.c  27 Jun 2007 13:30:14 -0000      1.106
+++ src/list.c  18 Oct 2007 07:14:29 -0000
@@ -301,8 +301,8 @@ read_header_primitive (bool raw_extended
   size_t size, written;
   union block *next_long_name = 0;
   union block *next_long_link = 0;
-  size_t next_long_name_blocks;
-  size_t next_long_link_blocks;
+  size_t next_long_name_blocks = 0;
+  size_t next_long_link_blocks = 0;

   while (1)
     {
Index: src/incremen.c
===================================================================
RCS file: /cvsroot/tar/tar/src/incremen.c,v
retrieving revision 1.59
diff -u -p -r1.59 incremen.c
--- src/incremen.c      3 Oct 2007 20:18:32 -0000       1.59
+++ src/incremen.c      18 Oct 2007 07:14:29 -0000
@@ -336,7 +336,6 @@ procdir (char *name_buffer, struct stat

   {
     const char *tag_file_name;
-    size_t len;
     
     switch (check_exclusion_tags (name_buffer, &tag_file_name))
       {




reply via email to

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