Permalink
Browse files

Fix build failure with -Wmissing-prototypes GCC option since it happe…

…nd on FreeBSD current.
  • Loading branch information...
1 parent fc22f4a commit 091a28e513073fe80423138194de8341bd2e16a5 @ggcueroad ggcueroad committed Feb 8, 2012
View
@@ -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)
@@ -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;
@@ -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)
{
@@ -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;
@@ -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];
@@ -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;

0 comments on commit 091a28e

Please sign in to comment.