summaryrefslogtreecommitdiffstats
path: root/usr.sbin/setfmac
diff options
context:
space:
mode:
Diffstat (limited to 'usr.sbin/setfmac')
-rw-r--r--usr.sbin/setfmac/Makefile2
-rw-r--r--usr.sbin/setfmac/setfmac.c6
2 files changed, 4 insertions, 4 deletions
diff --git a/usr.sbin/setfmac/Makefile b/usr.sbin/setfmac/Makefile
index bc3c21e..b4e2203 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 <bsd.prog.mk>
diff --git a/usr.sbin/setfmac/setfmac.c b/usr.sbin/setfmac/setfmac.c
index d5f5a61..f382cb2 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;
}
OpenPOWER on IntegriCloud