From: Brad King Date: Mon, 16 Nov 2009 16:29:10 +0000 (-0500) Subject: Use consistent function storage class X-Git-Tag: v2.8.0~158 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=87599157fdee0cf548f904aa6258ffb7e3f2acd0;p=thirdparty%2Flibarchive.git Use consistent function storage class Functions declared 'static' should be defined 'static' too. SVN-Revision: 1657 --- diff --git a/cpio/cpio.c b/cpio/cpio.c index c464ddef3..a67514b50 100644 --- a/cpio/cpio.c +++ b/cpio/cpio.c @@ -374,7 +374,7 @@ main(int argc, char *argv[]) return (0); } -void +static void usage(void) { const char *p; diff --git a/libarchive/archive_entry.c b/libarchive/archive_entry.c index 03dda1af5..f4aa096cd 100644 --- a/libarchive/archive_entry.c +++ b/libarchive/archive_entry.c @@ -1206,7 +1206,7 @@ archive_entry_acl_add_entry_w(struct archive_entry *entry, archive_entry_acl_add_entry_w_len(entry, type, permset, tag, id, name, wcslen(name)); } -void +static void archive_entry_acl_add_entry_w_len(struct archive_entry *entry, int type, int permset, int tag, int id, const wchar_t *name, size_t len) { diff --git a/libarchive/archive_read.c b/libarchive/archive_read.c index 15fe2f8dc..f829a4008 100644 --- a/libarchive/archive_read.c +++ b/libarchive/archive_read.c @@ -767,7 +767,7 @@ _archive_read_close(struct archive *_a) /* * Release memory and other resources. */ -int +static int _archive_read_finish(struct archive *_a) { struct archive_read *a = (struct archive_read *)_a; diff --git a/libarchive/archive_write_disk.c b/libarchive/archive_write_disk.c index b0dbe3b4a..7ce314934 100644 --- a/libarchive/archive_write_disk.c +++ b/libarchive/archive_write_disk.c @@ -1074,7 +1074,7 @@ restore_entry(struct archive_write_disk *a) * the failed system call. Note: This function should only ever perform * a single system call. */ -int +static int create_filesystem_object(struct archive_write_disk *a) { /* Create the entry. */ diff --git a/tar/util.c b/tar/util.c index 9cf344a18..0e66f3a15 100644 --- a/tar/util.c +++ b/tar/util.c @@ -299,7 +299,7 @@ do_chdir(struct bsdtar *bsdtar) bsdtar->pending_chdir = NULL; } -const char * +static const char * strip_components(const char *p, int elements) { /* Skip as many elements as necessary. */ diff --git a/tar/write.c b/tar/write.c index d4f20bca0..5eb95234a 100644 --- a/tar/write.c +++ b/tar/write.c @@ -512,7 +512,7 @@ cleanup: * cause the next line to be a directory to pass to chdir(). If * --null is specified, then a line "-C" is just another filename. */ -void +static void archive_names_from_file(struct bsdtar *bsdtar, struct archive *a) { struct lafe_line_reader *lr; @@ -1012,7 +1012,7 @@ write_file_data(struct bsdtar *bsdtar, struct archive *a, /* * Test if the specified file is new enough to include in the archive. */ -int +static int new_enough(struct bsdtar *bsdtar, const char *path, const struct stat *st) { struct archive_dir_entry *p; @@ -1099,7 +1099,7 @@ add_dir_list(struct bsdtar *bsdtar, const char *path, } } -void +static void test_for_append(struct bsdtar *bsdtar) { struct stat s;