瀏覽代碼

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".

expired.
SCALAR(0x830b08c)
Paul Eggert 17 年之前
父節點
當前提交
3c4f4ca423
共有 3 個文件被更改,包括 11 次插入5 次删除
  1. 9 2
      ChangeLog
  2. 0 1
      src/incremen.c
  3. 2 2
      src/list.c

+ 9 - 2
ChangeLog

@@ -1,8 +1,15 @@
+2007-10-18  Jim Meyering  <[email protected]>
+
+	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".
+
 2007-10-18  Sergey Poznyakoff  <[email protected]>
 
 	* doc/tar.texi (gzip): Remove compression patent
 	warning. According to Brett Smith, the patent is
-	expired. 
+	expired.
 
 2007-10-17  Sergey Poznyakoff  <[email protected]>
 
@@ -16,7 +23,7 @@
 	* THANKS: Add Lasse Collin and Jean-Pierre Demailly.
 	* NEWS: Update
 	* doc/tar.texi: Update
-	
+
 2007-10-12  Paul Eggert  <[email protected]>
 
 	* src/utf8.c (string_ascii_p): Recode to avoid bogus GCC 4.2.1

+ 0 - 1
src/incremen.c

@@ -336,7 +336,6 @@ procdir (char *name_buffer, struct stat *stat_data,
 
   {
     const char *tag_file_name;
-    size_t len;
     
     switch (check_exclusion_tags (name_buffer, &tag_file_name))
       {

+ 2 - 2
src/list.c

@@ -301,8 +301,8 @@ read_header_primitive (bool raw_extended_headers, struct tar_stat_info *info)
   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)
     {