]> git.ipfire.org Git - thirdparty/libarchive.git/commitdiff
Fix build failure with -Wmissing-prototypes GCC option since it happend on FreeBSD...
authorMichihiro NAKAJIMA <ggcueroad@gmail.com>
Wed, 8 Feb 2012 23:12:29 +0000 (08:12 +0900)
committerMichihiro NAKAJIMA <ggcueroad@gmail.com>
Thu, 9 Feb 2012 00:37:25 +0000 (09:37 +0900)
libarchive/archive_acl.c
libarchive/archive_read_support_format_mtree.c
libarchive/archive_read_support_format_zip.c
libarchive/test/test_compat_mac.c
libarchive/test/test_filter_count.c
libarchive/test/test_read_position.c

index 101df9b644e3e594f05a0514b1c520bf7c0aef3f..fbf029894436bba91773d692f7b8ffc1c264aaeb 100644 (file)
@@ -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)
index 3ba4be008e01bd35948684d9c578ab56bc2acbab..5c307ef203b9e9d6ed46a0c68864e4e007ebe444 100644 (file)
@@ -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;
index 247c2d204fbee580e29f8d4bc545838d3a011a71..02587e6416280105a4aa61d984da187719c9d889 100644 (file)
@@ -140,6 +140,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)
 {
index 0149d2ecb9b70b14abde4f24669c236a7682a035..3cad9f37bed00f1a48bec8721c822e434b2d2363 100644 (file)
@@ -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;
index 3f587e33852f43c3567d417ebc4d2aceccdcb1a7..175c88cc255a145e9e3d26b283834de60a8263bc 100644 (file)
 #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];
index 80838b5a3e522172f173e7e32de87ea441b99910..e010785bd5b2f8ab1f6ceaa093500876342de788 100644 (file)
@@ -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;