diff --git a/usr.sbin/getfmac/Makefile b/usr.sbin/getfmac/Makefile index 4e532e62a54c..ebc2a1543f59 100644 --- a/usr.sbin/getfmac/Makefile +++ b/usr.sbin/getfmac/Makefile @@ -4,6 +4,6 @@ PROG= getfmac MAN= getfmac.8 SRCS= getfmac.c -WARNS?= 2 +WARNS?= 6 .include diff --git a/usr.sbin/getfmac/getfmac.c b/usr.sbin/getfmac/getfmac.c index 351f43ece84d..7c03d5903e54 100644 --- a/usr.sbin/getfmac/getfmac.c +++ b/usr.sbin/getfmac/getfmac.c @@ -46,7 +46,7 @@ #define MAXELEMENTS 32 -void +static void usage(void) { diff --git a/usr.sbin/getpmac/Makefile b/usr.sbin/getpmac/Makefile index 962a3e77e388..b6ff0376b20c 100644 --- a/usr.sbin/getpmac/Makefile +++ b/usr.sbin/getpmac/Makefile @@ -4,6 +4,6 @@ PROG= getpmac MAN= getpmac.8 SRCS= getpmac.c -WARNS?= 2 +WARNS?= 6 .include diff --git a/usr.sbin/getpmac/getpmac.c b/usr.sbin/getpmac/getpmac.c index ee289e8028d4..6e815584cdc7 100644 --- a/usr.sbin/getpmac/getpmac.c +++ b/usr.sbin/getpmac/getpmac.c @@ -46,7 +46,7 @@ #define MAXELEMENTS 32 -void +static void usage(void) { diff --git a/usr.sbin/setfmac/Makefile b/usr.sbin/setfmac/Makefile index bc3c21ea9d82..b4e220319c16 100644 --- a/usr.sbin/setfmac/Makefile +++ b/usr.sbin/setfmac/Makefile @@ -5,6 +5,6 @@ LINKS= ${BINDIR}/setfmac ${BINDIR}/setfsmac MAN= setfmac.8 setfsmac.8 SRCS= setfmac.c -WARNS?= 2 +WARNS?= 6 .include diff --git a/usr.sbin/setfmac/setfmac.c b/usr.sbin/setfmac/setfmac.c index d5f5a611e88a..f382cb272dd3 100644 --- a/usr.sbin/setfmac/setfmac.c +++ b/usr.sbin/setfmac/setfmac.c @@ -54,7 +54,7 @@ struct label_spec { regex_t regex; /* compiled regular expression to match */ char *regexstr; /* uncompiled regular expression */ mode_t mode; /* mode to possibly match */ - char *modestr; /* print-worthy ",-?" mode string */ + const char *modestr; /* print-worthy ",-?" mode string */ char *mactext; /* MAC label to apply */ int flags; /* miscellaneous flags */ #define F_DONTLABEL 0x01 @@ -195,13 +195,13 @@ usage(int is_setfmac) exit(1); } -int +static int chomp_line(char **line, size_t *linesize) { char *s; int freeme = 0; - for (s = *line; s - *line < *linesize; s++) { + for (s = *line; (unsigned)(s - *line) < *linesize; s++) { if (!isspace(*s)) break; } diff --git a/usr.sbin/setpmac/Makefile b/usr.sbin/setpmac/Makefile index 08b8b93d0bcc..ca398ea7a8c3 100644 --- a/usr.sbin/setpmac/Makefile +++ b/usr.sbin/setpmac/Makefile @@ -4,6 +4,6 @@ PROG= setpmac MAN= setpmac.8 SRCS= setpmac.c -WARNS?= 2 +WARNS?= 6 .include diff --git a/usr.sbin/setpmac/setpmac.c b/usr.sbin/setpmac/setpmac.c index 8314a7756455..bc096bbbc56a 100644 --- a/usr.sbin/setpmac/setpmac.c +++ b/usr.sbin/setpmac/setpmac.c @@ -46,7 +46,7 @@ #define MAXELEMENTS 32 -void +static void usage(void) { @@ -57,7 +57,7 @@ usage(void) int main(int argc, char *argv[]) { - char *shell; + const char *shell; mac_t label; int error;