From ca517e8b320c7a31c3a147fb1212ddb33cabd919 Mon Sep 17 00:00:00 2001 From: David Oberhollenzer Date: Thu, 22 Jun 2017 13:37:40 +0200 Subject: Eliminate warnings about missing prototypes This patch eliminates warnings generated by the -Wmissing-prototypes option. With this flag set, we are now forced to have prototypes for all global, exported functions, that have to be made visible to the definitions and we are forced to mark all local functions as static. Signed-off-by: David Oberhollenzer --- jffsX-utils/mkfs.jffs2.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'jffsX-utils/mkfs.jffs2.c') diff --git a/jffsX-utils/mkfs.jffs2.c b/jffsX-utils/mkfs.jffs2.c index 2fb7730..9aa6c39 100644 --- a/jffsX-utils/mkfs.jffs2.c +++ b/jffsX-utils/mkfs.jffs2.c @@ -112,7 +112,7 @@ static int squash_perms = 0; static int fake_times = 0; int target_endian = __BYTE_ORDER; -uint32_t find_hardlink(struct filesystem_entry *e) +static uint32_t find_hardlink(struct filesystem_entry *e) { struct filesystem_entry *f; struct rb_node **n = &hardlinks.rb_node; @@ -139,7 +139,7 @@ uint32_t find_hardlink(struct filesystem_entry *e) return 0; } -extern char *xreadlink(const char *path) +static char *xreadlink(const char *path) { static const int GROWBY = 80; /* how large we will grow strings by */ @@ -1428,7 +1428,7 @@ static const char helptext[] = " -V, --version Display version information\n" " -i, --incremental=FILE Parse FILE and generate appendage output for it\n\n"; -int load_next_block() { +static int load_next_block(void) { int ret; ret = read(in_fd, file_buffer, erase_block_size); @@ -1439,7 +1439,7 @@ int load_next_block() { return ret; } -void process_buffer(int inp_size) { +static void process_buffer(int inp_size) { uint8_t *p = file_buffer; union jffs2_node_union *node; uint16_t type; @@ -1542,7 +1542,7 @@ void process_buffer(int inp_size) { } } -void parse_image(){ +static void parse_image(void){ int ret; file_buffer = xmalloc(erase_block_size); -- cgit v1.2.3