aboutsummaryrefslogtreecommitdiff
path: root/nand-utils
diff options
context:
space:
mode:
authorDavid Oberhollenzer <david.oberhollenzer@sigma-star.at>2017-06-22 13:37:40 +0200
committerDavid Oberhollenzer <david.oberhollenzer@sigma-star.at>2017-06-28 10:27:31 +0200
commitca517e8b320c7a31c3a147fb1212ddb33cabd919 (patch)
treea26d535836a82ea241dc0389b061176ddfcd8329 /nand-utils
parent3029b659e89caa79b6860c3bbe8cbc18b53af678 (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 'nand-utils')
-rw-r--r--nand-utils/nandtest.c8
-rw-r--r--nand-utils/nftl_format.c2
2 files changed, 6 insertions, 4 deletions
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] <device>\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] <mtddevice> [<start offset> [<size>]]\n", PROGRAM_NAME);
exit(rc);