From: Michihiro NAKAJIMA Date: Wed, 8 Feb 2012 23:12:29 +0000 (+0900) Subject: Fix build failure with -Wmissing-prototypes GCC option since it happend on FreeBSD... X-Git-Tag: v3.0.4~2^2~101 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=091a28e513073fe80423138194de8341bd2e16a5;p=thirdparty%2Flibarchive.git Fix build failure with -Wmissing-prototypes GCC option since it happend on FreeBSD current. --- diff --git a/libarchive/archive_acl.c b/libarchive/archive_acl.c index a09faaee7..bf4b61040 100644 --- a/libarchive/archive_acl.c +++ b/libarchive/archive_acl.c @@ -52,6 +52,9 @@ static int acl_special(struct archive_acl *acl, int type, int permset, int tag); static struct archive_acl_entry *acl_new_entry(struct archive_acl *acl, int type, int permset, int tag, int id); +static int archive_acl_add_entry_len_l(struct archive_acl *acl, + int type, int permset, int tag, int id, const char *name, + size_t len, struct archive_string_conv *sc); static int isint_w(const wchar_t *start, const wchar_t *end, int *result); static int ismode_w(const wchar_t *start, const wchar_t *end, int *result); static void next_field_w(const wchar_t **wp, const wchar_t **start, @@ -152,7 +155,7 @@ archive_acl_add_entry_w_len(struct archive_acl *acl, return ARCHIVE_OK; } -int +static int archive_acl_add_entry_len_l(struct archive_acl *acl, int type, int permset, int tag, int id, const char *name, size_t len, struct archive_string_conv *sc) diff --git a/libarchive/archive_read_support_format_mtree.c b/libarchive/archive_read_support_format_mtree.c index 3ba4be008..5c307ef20 100644 --- a/libarchive/archive_read_support_format_mtree.c +++ b/libarchive/archive_read_support_format_mtree.c @@ -101,6 +101,7 @@ struct mtree { int64_t cur_size; }; +static int bid_keycmp(const char *, const char *, ssize_t); static int cleanup(struct archive_read *); static int mtree_bid(struct archive_read *, int); static int parse_file(struct archive_read *, struct archive_entry *, @@ -317,7 +318,7 @@ next_line(struct archive_read *a, * Returns the length of a mtree keyword if matched. * Returns 0 if not matched. */ -int +static int bid_keycmp(const char *p, const char *key, ssize_t len) { int match_len = 0; diff --git a/libarchive/archive_read_support_format_zip.c b/libarchive/archive_read_support_format_zip.c index 5d129376f..d5deab8d7 100644 --- a/libarchive/archive_read_support_format_zip.c +++ b/libarchive/archive_read_support_format_zip.c @@ -144,6 +144,9 @@ static time_t zip_time(const char *); static const char *compression_name(int compression); static void process_extra(const char *, size_t, struct zip_entry *); +int archive_read_support_format_zip_streamable(struct archive *); +int archive_read_support_format_zip_seekable(struct archive *); + int archive_read_support_format_zip_streamable(struct archive *_a) { diff --git a/libarchive/test/test_compat_mac.c b/libarchive/test/test_compat_mac.c index 0149d2ecb..3cad9f37b 100644 --- a/libarchive/test/test_compat_mac.c +++ b/libarchive/test/test_compat_mac.c @@ -34,11 +34,15 @@ __FBSDID("$FreeBSD$"); "abcdefghijklmnopqrstuvwxyz/" \ "abcdefghijklmnopqrstuvwxyz/" +static void test_compat_mac_1(void); +static void test_compat_mac_2(void); + /* * Apple shipped an extended version of GNU tar with Mac OS X 10.5 * and earlier. */ -void test_compat_mac_1() +static void +test_compat_mac_1(void) { char name[] = "test_compat_mac-1.tar.Z"; struct archive_entry *ae; @@ -133,7 +137,8 @@ void test_compat_mac_1() /* * Apple shipped a customized version of bsdtar starting with MacOS 10.6. */ -void test_compat_mac_2() +static void +test_compat_mac_2(void) { char name[] = "test_compat_mac-2.tar.Z"; struct archive_entry *ae; diff --git a/libarchive/test/test_filter_count.c b/libarchive/test/test_filter_count.c index 3f587e338..175c88cc2 100644 --- a/libarchive/test/test_filter_count.c +++ b/libarchive/test/test_filter_count.c @@ -25,7 +25,10 @@ #include "test.h" __FBSDID("$FreeBSD: head/lib/libarchive/test/test_read_file_nonexistent.c 189473 2009-03-07 02:09:21Z kientzle $"); -void +static void read_test(const char *name); +static void write_test(void); + +static void read_test(const char *name) { struct archive* a = archive_read_new(); @@ -44,7 +47,7 @@ read_test(const char *name) archive_read_free(a); } -void +static void write_test(void) { char buff[4096]; diff --git a/libarchive/test/test_read_position.c b/libarchive/test/test_read_position.c index 00f71b197..f245563f4 100644 --- a/libarchive/test/test_read_position.c +++ b/libarchive/test/test_read_position.c @@ -30,7 +30,9 @@ static unsigned char tmp[1000]; static unsigned char buff[10000]; size_t data_sizes[] = {0, 5, 511, 512, 513}; -void +static void verify_read_positions(struct archive *a); + +static void verify_read_positions(struct archive *a) { struct archive_entry *ae;