diff --git a/tools/Makefile b/tools/Makefile index 87e04ff..9aa699d 100644 --- a/tools/Makefile +++ b/tools/Makefile @@ -7,7 +7,7 @@ CC = gcc CFLAGS = -Wall -Wstrict-prototypes -Wshadow -Wpointer-arith -Wcast-qual \ -Wcast-align -Wwrite-strings -Wnested-externs -Winline -W \ - -I../include + -Wundef -Wmissing-prototypes -I../include CFLAGS += -O2 # When debugging, use the following instead diff --git a/tools/i2cdetect.c b/tools/i2cdetect.c index d1843a9..fe8e6d9 100644 --- a/tools/i2cdetect.c +++ b/tools/i2cdetect.c @@ -33,7 +33,7 @@ #define MODE_READ 2 #define MODE_FUNC 3 -void help(void) +static void help(void) { fprintf(stderr, "Syntax: i2cdetect [-y] [-a] [-q|-r] I2CBUS [FIRST LAST]\n" @@ -51,7 +51,7 @@ void help(void) print_i2c_busses(0); } -int scan_i2c_bus(int file, const int mode, const int first, const int last) +static int scan_i2c_bus(int file, int mode, int first, int last) { int i, j; int res; @@ -155,7 +155,7 @@ static const struct func all_func[] = { { .value = 0, .name = "" } }; -void print_functionality(unsigned long funcs) +static void print_functionality(unsigned long funcs) { int i; diff --git a/tools/i2cdump.c b/tools/i2cdump.c index 72691ac..18c4997 100644 --- a/tools/i2cdump.c +++ b/tools/i2cdump.c @@ -29,7 +29,7 @@ #include #include "../version.h" -void help(void) +static void help(void) { fprintf(stderr, "Syntax: i2cdump [-f] [-y] I2CBUS ADDRESS [MODE] " "[BANK [BANKREG]]\n" diff --git a/tools/i2cget.c b/tools/i2cget.c index 18c4fa6..81e6d69 100644 --- a/tools/i2cget.c +++ b/tools/i2cget.c @@ -32,9 +32,9 @@ #include #include "../version.h" -void help(void) __attribute__ ((noreturn)); +static void help(void) __attribute__ ((noreturn)); -void help(void) +static void help(void) { fprintf(stderr, "Syntax: i2cget [-f] [-y] I2CBUS CHIP-ADDRESS " "[DATA-ADDRESS [MODE]]\n" @@ -50,7 +50,7 @@ void help(void) exit(1); } -int check_funcs(int file, int i2cbus, int size, int daddress, int pec) +static int check_funcs(int file, int i2cbus, int size, int daddress, int pec) { unsigned long funcs; @@ -102,7 +102,8 @@ int check_funcs(int file, int i2cbus, int size, int daddress, int pec) return 0; } -int confirm(const char *filename, int address, int size, int daddress, int pec) +static int confirm(const char *filename, int address, int size, int daddress, + int pec) { int dont = 0; diff --git a/tools/i2cset.c b/tools/i2cset.c index abeabe8..f60899e 100644 --- a/tools/i2cset.c +++ b/tools/i2cset.c @@ -29,9 +29,9 @@ #include #include "../version.h" -void help(void) __attribute__ ((noreturn)); +static void help(void) __attribute__ ((noreturn)); -void help(void) +static void help(void) { fprintf(stderr, "Syntax: i2cset [-f] [-y] I2CBUS CHIP-ADDRESS DATA-ADDRESS " "VALUE [MODE] [MASK]\n"