diff options
author | David Oberhollenzer <david.oberhollenzer@sigma-star.at> | 2017-06-22 13:37:40 +0200 |
---|---|---|
committer | David Oberhollenzer <david.oberhollenzer@sigma-star.at> | 2017-06-28 10:27:31 +0200 |
commit | ca517e8b320c7a31c3a147fb1212ddb33cabd919 (patch) | |
tree | a26d535836a82ea241dc0389b061176ddfcd8329 /misc-utils | |
parent | 3029b659e89caa79b6860c3bbe8cbc18b53af678 (diff) |
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 <david.oberhollenzer@sigma-star.at>
Diffstat (limited to 'misc-utils')
-rw-r--r-- | misc-utils/docfdisk.c | 2 | ||||
-rw-r--r-- | misc-utils/flash_otp_write.c | 2 | ||||
-rw-r--r-- | misc-utils/ftl_check.c | 2 | ||||
-rw-r--r-- | misc-utils/mtd_debug.c | 13 |
4 files changed, 10 insertions, 9 deletions
diff --git a/misc-utils/docfdisk.c b/misc-utils/docfdisk.c index b363662..c2b9150 100644 --- a/misc-utils/docfdisk.c +++ b/misc-utils/docfdisk.c @@ -44,7 +44,7 @@ struct INFTLMediaHeader *mh; #define MAXSCAN 10 -void show_header(int mhoffs) { +static void show_header(int mhoffs) { int i, unitsize, numunits, bmbits, numpart; int start, end, num, nextunit; unsigned int flags; diff --git a/misc-utils/flash_otp_write.c b/misc-utils/flash_otp_write.c index 111318d..b02d0b0 100644 --- a/misc-utils/flash_otp_write.c +++ b/misc-utils/flash_otp_write.c @@ -16,7 +16,7 @@ #include <common.h> #include <mtd/mtd-user.h> -ssize_t xread(int fd, void *buf, size_t count) +static ssize_t xread(int fd, void *buf, size_t count) { ssize_t ret, done = 0; diff --git a/misc-utils/ftl_check.c b/misc-utils/ftl_check.c index 970d968..a853cf4 100644 --- a/misc-utils/ftl_check.c +++ b/misc-utils/ftl_check.c @@ -169,7 +169,7 @@ static void check_partition(int fd) } /* format_partition */ /* Show usage information */ -void showusage(void) +static void showusage(void) { fprintf(stderr, "usage: %s device\n", PROGRAM_NAME); } diff --git a/misc-utils/mtd_debug.c b/misc-utils/mtd_debug.c index f3826cf..90f5d52 100644 --- a/misc-utils/mtd_debug.c +++ b/misc-utils/mtd_debug.c @@ -76,7 +76,7 @@ static int getregions(int fd, struct region_info_user *regions, int *n) return 0; } -int erase_flash(int fd, u_int32_t offset, u_int32_t bytes) +static int erase_flash(int fd, u_int32_t offset, u_int32_t bytes) { int err; struct erase_info_user erase; @@ -91,7 +91,7 @@ int erase_flash(int fd, u_int32_t offset, u_int32_t bytes) return 0; } -void printsize(u_int32_t x) +static void printsize(u_int32_t x) { int i; static const char *flags = "KMGT"; @@ -103,7 +103,7 @@ void printsize(u_int32_t x) printf("(%u%c)", x, flags[i]); } -int flash_to_file(int fd, off_t offset, size_t len, const char *filename) +static int flash_to_file(int fd, off_t offset, size_t len, const char *filename) { u_int8_t *buf = NULL; int outfd, err; @@ -172,7 +172,8 @@ err0: return 1; } -int file_to_flash(int fd, off_t offset, u_int32_t len, const char *filename) +static int file_to_flash(int fd, off_t offset, u_int32_t len, + const char *filename) { u_int8_t *buf = NULL; FILE *fp; @@ -228,7 +229,7 @@ retry: return 0; } -int showinfo(int fd) +static int showinfo(int fd) { int i, err, n; struct mtd_info_user mtd; @@ -338,7 +339,7 @@ int showinfo(int fd) return 0; } -void showusage(void) +static void showusage(void) { fprintf(stderr, "usage: %1$s info <device>\n" " %1$s read <device> <offset> <len> <dest-filename>\n" |