diff options
author | Martin Matuska <martin@matuska.org> | 2016-05-11 11:26:47 +0200 |
---|---|---|
committer | Martin Matuska <martin@matuska.org> | 2016-05-11 23:44:33 +0200 |
commit | 85f740c233e99e970589318f13aca87eb0b7fe39 (patch) | |
tree | c512d833415cac55fe11a2d0db9c9c6abdbc1e57 /cat/bsdcat.c | |
parent | 61c56e52b354bddfccb059d4304dd0c7f0d926d3 (diff) | |
download | libarchive-85f740c233e99e970589318f13aca87eb0b7fe39.tar.gz |
cat: declare static variables and fix several compiler warnings
Diffstat (limited to 'cat/bsdcat.c')
-rw-r--r-- | cat/bsdcat.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/cat/bsdcat.c b/cat/bsdcat.c index af140e00..9ef75a6b 100644 --- a/cat/bsdcat.c +++ b/cat/bsdcat.c @@ -42,10 +42,10 @@ __FBSDID("$FreeBSD$"); #define BYTES_PER_BLOCK (20*512) -struct archive *a; -struct archive_entry *ae; -char *bsdcat_current_path; -int exit_status = 0; +static struct archive *a; +static struct archive_entry *ae; +static const char *bsdcat_current_path; +static int exit_status = 0; void @@ -68,7 +68,7 @@ version(void) } void -bsdcat_next() +bsdcat_next(void) { a = archive_read_new(); archive_read_support_filter_all(a); @@ -85,7 +85,7 @@ bsdcat_print_error(void) } void -bsdcat_read_to_stdout(char* filename) +bsdcat_read_to_stdout(const char* filename) { int r; |