]> Dogcows Code - chaz/tar/commitdiff
tar: remove unused externs, or make them static
authorPaul Eggert <eggert@cs.ucla.edu>
Wed, 19 Dec 2012 20:33:43 +0000 (12:33 -0800)
committerPaul Eggert <eggert@cs.ucla.edu>
Wed, 19 Dec 2012 20:34:24 +0000 (12:34 -0800)
* src/buffer.c (record_buffer_aligned, flush_write_ptr, flush_read_ptr)
(duration):
* src/list.c (recent_global_header):
* src/unlink.c (deferred_unlink_delay):
* src/transform.c (transform_flags):
* src/xattrs.c (acl_get_file_at, acl_set_file_at, file_has_acl_at):
Now static.
* src/common.h (rmt_command_option): Remove; unused.
* src/tar.c (check_links_option, allocated_archive_names):
Move decls here from common.h; these are now static.

src/buffer.c
src/common.h
src/list.c
src/tar.c
src/transform.c
src/unlink.c
src/xattrs.c

index 422798ed32f696bece6e3799ce42caac9525a6ea..4980d9bae400ee8d0c76a559a1d93c8bac0e5330 100644 (file)
@@ -41,7 +41,7 @@
 static tarlong prev_written;    /* bytes written on previous volumes */
 static tarlong bytes_written;   /* bytes written on this volume */
 static void *record_buffer[2];  /* allocated memory */
-union block *record_buffer_aligned[2];
+static union block *record_buffer_aligned[2];
 static int record_index;
 
 /* FIXME: The following variables should ideally be static to this
@@ -83,8 +83,8 @@ extern bool time_to_start_writing;
 
 bool write_archive_to_stdout;
 
-void (*flush_write_ptr) (size_t);
-void (*flush_read_ptr) (void);
+static void (*flush_write_ptr) (size_t);
+static void (*flush_read_ptr) (void);
 
 \f
 char *volume_label;
@@ -230,7 +230,7 @@ clear_read_error_count (void)
 \f
 /* Time-related functions */
 
-double duration;
+static double duration;
 
 void
 set_start_time (void)
index eba3bb49010e89d74c85982643319060623eec3f..18f7bc60eee3bca1a32c5e41096dd0a40c18577b 100644 (file)
@@ -143,9 +143,6 @@ GLOBAL const char *use_compress_program_option;
 GLOBAL bool dereference_option;
 GLOBAL bool hard_dereference_option;
 
-/* Print a message if not all links are dumped */
-GLOBAL int check_links_option;
-
 /* Patterns that match file names to be excluded.  */
 GLOBAL struct exclude *excluded;
 
@@ -247,9 +244,6 @@ GLOBAL bool read_full_records_option;
 
 GLOBAL bool remove_files_option;
 
-/* Specified rmt command.  */
-GLOBAL const char *rmt_command_option;
-
 /* Specified remote shell command.  */
 GLOBAL const char *rsh_command_option;
 
@@ -330,11 +324,10 @@ GLOBAL struct timespec last_stat_time;    /* when the statistics was last
 
 GLOBAL struct tar_stat_info current_stat_info;
 
-/* List of tape drive names, number of such tape drives, allocated number,
+/* List of tape drive names, number of such tape drives,
    and current cursor in list.  */
 GLOBAL const char **archive_name_array;
 GLOBAL size_t archive_names;
-GLOBAL size_t allocated_archive_names;
 GLOBAL const char **archive_name_cursor;
 
 /* Output index file name.  */
index 7bb719fe934ee857fe33cc3b03f6225aca5e3fb5..ffe255e477f3999523213b37bde1412aa0abdc09 100644 (file)
@@ -34,7 +34,7 @@ union block *recent_long_name;        /* recent long name header and contents */
 union block *recent_long_link; /* likewise, for long link */
 size_t recent_long_name_blocks;        /* number of blocks in recent_long_name */
 size_t recent_long_link_blocks;        /* likewise, for long link */
-union block *recent_global_header; /* Recent global header block */
+static union block *recent_global_header; /* Recent global header block */
 
 #define GID_FROM_HEADER(where) gid_from_header (where, sizeof (where))
 #define MAJOR_FROM_HEADER(where) major_from_header (where, sizeof (where))
index cbb6c68439c2d06d2c42b34cead3107275f1f9ae..d230e958df4ab1e530a6d20099d0edb4e513364a 100644 (file)
--- a/src/tar.c
+++ b/src/tar.c
 # define DEFAULT_BLOCKING 20
 #endif
 
+/* Print a message if not all links are dumped */
+static int check_links_option;
+
+/* Number of allocated tape drive names.  */
+static size_t allocated_archive_names;
+
 \f
 /* Miscellaneous.  */
 
index e9b776a405d9248af9b75ec1596da4fca9919b78..e268312cfc61000eb11258af4f35b2357b0a972e 100644 (file)
@@ -71,7 +71,7 @@ struct transform
 
 \f
 
-int transform_flags = XFORM_ALL;
+static int transform_flags = XFORM_ALL;
 static struct transform *transform_head, *transform_tail;
 
 static struct transform *
index 522ae118ca3cb2adb5ca0be9413157a7e4dcd25e..d89f3ed72b61a1f70cc17dd91cee4adde4098200 100644 (file)
@@ -39,7 +39,7 @@ static struct deferred_unlink *dunlink_avail;
 
 /* Delay (number of records written) between adding entry to the
    list and its actual removal. */
-size_t deferred_unlink_delay = 0;
+static size_t deferred_unlink_delay = 0;
 
 static struct deferred_unlink *
 dunlink_alloc (void)
index 2ddd1af95065c2614fc77e7620ea9717763f0aae..ef436c769129f7a015b6c628f08ccf53ab0124c7 100644 (file)
@@ -58,9 +58,9 @@ static struct
 #ifdef HAVE_POSIX_ACLS
 
 /* acl-at wrappers, TODO: move to gnulib in future? */
-acl_t acl_get_file_at (int dirfd, const char *file, acl_type_t type);
-int acl_set_file_at (int dirfd, const char *file, acl_type_t type, acl_t acl);
-int file_has_acl_at (int dirfd, char const *, struct stat const *);
+static acl_t acl_get_file_at (int, const char *, acl_type_t);
+static int acl_set_file_at (int, const char *, acl_type_t, acl_t);
+static int file_has_acl_at (int, char const *, struct stat const *);
 
 /* acl_get_file_at */
 #define AT_FUNC_NAME acl_get_file_at
This page took 0.028508 seconds and 4 git commands to generate.