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 --- nand-utils/nandtest.c | 8 +++++--- nand-utils/nftl_format.c | 2 +- 2 files changed, 6 insertions(+), 4 deletions(-) (limited to 'nand-utils') diff --git a/nand-utils/nandtest.c b/nand-utils/nandtest.c index 9e39446..d5c7369 100644 --- a/nand-utils/nandtest.c +++ b/nand-utils/nandtest.c @@ -17,7 +17,7 @@ #include "mtd/mtd-user.h" #include "common.h" -void usage(int status) +static void usage(int status) { fprintf(status ? stderr : stdout, "usage: %s [OPTIONS] \n\n" @@ -40,7 +40,8 @@ int fd; int markbad=0; int seed; -int read_and_compare(loff_t ofs, unsigned char *data, unsigned char *rbuf) +static int read_and_compare(loff_t ofs, unsigned char *data, + unsigned char *rbuf) { ssize_t len; int i; @@ -89,7 +90,8 @@ int read_and_compare(loff_t ofs, unsigned char *data, unsigned char *rbuf) return 0; } -int erase_and_write(loff_t ofs, unsigned char *data, unsigned char *rbuf, int nr_reads) +static int erase_and_write(loff_t ofs, unsigned char *data, unsigned char *rbuf, + int nr_reads) { struct erase_info_user er; ssize_t len; diff --git a/nand-utils/nftl_format.c b/nand-utils/nftl_format.c index ea8199d..ec87604 100644 --- a/nand-utils/nftl_format.c +++ b/nand-utils/nftl_format.c @@ -198,7 +198,7 @@ static int checkbbt(void) return (0); } -void usage(int rc) +static void usage(int rc) { fprintf(stderr, "Usage: %s [-ib] [ []]\n", PROGRAM_NAME); exit(rc); -- cgit v1.2.3