find(1): Raise WARNS to 6 and fix all warnings.
authorSascha Wildner <saw@online.de>
Tue, 17 Feb 2009 15:13:47 +0000 (16:13 +0100)
committerSascha Wildner <saw@online.de>
Tue, 17 Feb 2009 15:14:13 +0000 (16:14 +0100)
usr.bin/find/Makefile
usr.bin/find/function.c
usr.bin/find/getdate.y

index 7a79b73..b07cd87 100644 (file)
@@ -7,6 +7,5 @@ SRCS=   find.c function.c ls.c main.c misc.c operator.c option.c \
        getdate.y
 CFLAGS+=-DHAVE_SYS_TIMEB_H -I${.CURDIR}
 YFLAGS=
-WARNS?=        4
 
 .include <bsd.prog.mk>
index 81fbf63..b5d79c7 100644 (file)
@@ -763,7 +763,7 @@ f_fstype(PLAN *plan, FTSENT *entry)
        static int first = 1;
        struct statfs sb;
        static int val_type, val_flags;
-       char *p, save[2];
+       char *p, save[2] = {0,0};
 
        if ((plan->flags & F_MTMASK) == F_MTUNKNOWN)
                return 0;
index 0ca6aeb..53a450a 100644 (file)
@@ -857,6 +857,7 @@ get_date(char *p, struct timeb *now)
     time_t             tod;
     time_t nowtime;
 
+    bzero(&gmt, sizeof(struct tm));
     yyInput = p;
     if (now == NULL) {
        struct tm *gmt_ptr;