From cb86610a7952ec74b958820da1cc73ed8807a764 Mon Sep 17 00:00:00 2001 From: Sascha Wildner Date: Wed, 4 Dec 2013 19:11:10 +0100 Subject: [PATCH] opie{info,key,passwd}(1): Raise WARNS to 2 or 3 and fix warnings. --- contrib/opie/opiekey.c | 3 +-- contrib/opie/opiepasswd.c | 5 ++--- usr.bin/opieinfo/Makefile | 2 +- usr.bin/opiekey/Makefile | 2 +- usr.bin/opiepasswd/Makefile | 2 +- 5 files changed, 6 insertions(+), 8 deletions(-) diff --git a/contrib/opie/opiekey.c b/contrib/opie/opiekey.c index 79cec8d135..4fdffb5003 100644 --- a/contrib/opie/opiekey.c +++ b/contrib/opie/opiekey.c @@ -145,7 +145,7 @@ int main FUNCTION((argc, argv), int argc AND char *argv[]) int type = RESPONSE_STANDARD; int force = 0; - if (slash = strchr(argv[0], '/')) + if ((slash = strchr(argv[0], '/')) != 0) slash++; else slash = argv[0]; @@ -293,7 +293,6 @@ int main FUNCTION((argc, argv), int argc AND char *argv[]) { char buf[OPIE_SEED_MAX + 48 + 1]; - char *c; for (; i <= keynum; i++) { if (count > 1) diff --git a/contrib/opie/opiepasswd.c b/contrib/opie/opiepasswd.c index ef78bb3ff2..735b2353cf 100644 --- a/contrib/opie/opiepasswd.c +++ b/contrib/opie/opiepasswd.c @@ -45,7 +45,6 @@ License Agreement applies to this software. (skeyinit.c). $FreeBSD: src/contrib/opie/opiepasswd.c,v 1.1.1.2.6.3 2002/07/15 14:48:43 des Exp $ - $DragonFly: src/contrib/opie/opiepasswd.c,v 1.3 2006/03/22 21:22:39 drhodus Exp $ */ #include "opie_cfg.h" @@ -251,7 +250,7 @@ int main FUNCTION((argc, argv), int argc AND char *argv[]) on = opiegetsequence(&opie); { char *c; - if (c = strrchr(tmp, ' ')) + if ((c = strrchr(tmp, ' ')) != NULL) opiestrncpy(oseed, c + 1, sizeof(oseed)); else { #if DEBUG @@ -287,7 +286,7 @@ int main FUNCTION((argc, argv), int argc AND char *argv[]) nn = opiegetsequence(&opie); { char *c; - if (c = strrchr(tmp, ' ')) + if ((c = strrchr(tmp, ' ')) != NULL) opiestrncpy(nseed, c + 1, sizeof(nseed)); else { #if DEBUG diff --git a/usr.bin/opieinfo/Makefile b/usr.bin/opieinfo/Makefile index a41135b6b6..5f3e7f7000 100644 --- a/usr.bin/opieinfo/Makefile +++ b/usr.bin/opieinfo/Makefile @@ -7,7 +7,7 @@ PROG= opieinfo CFLAGS+=-I${.CURDIR}/../../lib/libopie CFLAGS+=-I${OPIE_DIST} CFLAGS+=-DINSECURE_OVERRIDE -WARNS?= 1 +WARNS?= 2 DPADD= ${LIBOPIE} ${LIBMD} LDADD= -lopie -lmd diff --git a/usr.bin/opiekey/Makefile b/usr.bin/opiekey/Makefile index eab36906c8..9b8198740d 100644 --- a/usr.bin/opiekey/Makefile +++ b/usr.bin/opiekey/Makefile @@ -7,7 +7,7 @@ PROG= opiekey CFLAGS+=-I${.CURDIR}/../../lib/libopie CFLAGS+=-I${OPIE_DIST} CFLAGS+=-DINSECURE_OVERRIDE -WARNS?= 1 +WARNS?= 3 DPADD= ${LIBOPIE} ${LIBMD} LDADD= -lopie -lmd diff --git a/usr.bin/opiepasswd/Makefile b/usr.bin/opiepasswd/Makefile index 785cabe78e..d255998cbd 100644 --- a/usr.bin/opiepasswd/Makefile +++ b/usr.bin/opiepasswd/Makefile @@ -7,7 +7,7 @@ PROG= opiepasswd CFLAGS+=-I${.CURDIR}/../../lib/libopie CFLAGS+=-I${OPIE_DIST} CFLAGS+=-DINSECURE_OVERRIDE -WARNS?= 1 +WARNS?= 3 DPADD= ${LIBOPIE} ${LIBMD} LDADD= -lopie -lmd -- 2.41.0