From 37b32352481728a8159afc1804e450d4937319ef Mon Sep 17 00:00:00 2001 From: obrien Date: Mon, 15 Apr 2002 19:27:41 +0000 Subject: Fix to WARNS=2 level. Tested by: AXP gcc 3.1 --- usr.bin/find/Makefile | 3 ++- usr.bin/find/getdate.y | 25 +++---------------------- usr.bin/find/ls.c | 5 +++-- 3 files changed, 8 insertions(+), 25 deletions(-) (limited to 'usr.bin') diff --git a/usr.bin/find/Makefile b/usr.bin/find/Makefile index 5985392..b6aace9 100644 --- a/usr.bin/find/Makefile +++ b/usr.bin/find/Makefile @@ -4,7 +4,8 @@ PROG= find SRCS= find.c function.c ls.c main.c misc.c operator.c option.c \ getdate.y -CFLAGS+= -I${.CURDIR} +WARNS?=2 +CFLAGS+= -DHAVE_SYS_TIMEB_H -I${.CURDIR} YFLAGS= .include diff --git a/usr.bin/find/getdate.y b/usr.bin/find/getdate.y index 25eed68..1531461 100644 --- a/usr.bin/find/getdate.y +++ b/usr.bin/find/getdate.y @@ -14,24 +14,6 @@ /* $FreeBSD$ */ -#ifdef HAVE_CONFIG_H -#if defined (emacs) || defined (CONFIG_BROKETS) -#include -#else -#include "config.h" -#endif -#endif - -/* Since the code of getdate.y is not included in the Emacs executable - itself, there is no need to #define static in this file. Even if - the code were included in the Emacs executable, it probably - wouldn't do any harm to #undef it here; this will only cause - problems if we try to write to a static variable, which I don't - think this code needs to do. */ -#ifdef emacs -#undef static -#endif - #include #include @@ -44,12 +26,11 @@ # include #else /* defined(vms) */ # include -/*# include "xtime.h"*/ # include # include #endif /* !defined(vms) */ -#if defined (STDC_HEADERS) || defined (USG) +#if defined (__STDC__) || defined (USG) #include #endif @@ -60,7 +41,7 @@ #define bcopy(from, to, len) memcpy ((to), (from), (len)) #endif -#if defined (STDC_HEADERS) +#if defined (__STDC__) #include #endif @@ -556,7 +537,7 @@ static TABLE const MilitaryTable[] = { /* ARGSUSED */ static int yyerror(s) - char *s; + char *s __unused; { return 0; } diff --git a/usr.bin/find/ls.c b/usr.bin/find/ls.c index bb7b97e..15179fb 100644 --- a/usr.bin/find/ls.c +++ b/usr.bin/find/ls.c @@ -42,6 +42,7 @@ __FBSDID("$FreeBSD$"); #include #include +#include #include #include #include @@ -69,7 +70,7 @@ printlong(name, accpath, sb) { char modep[15]; - (void)printf("%6lu %4qd ", (u_long) sb->st_ino, sb->st_blocks); + (void)printf("%6lu %4"PRId64" ", (u_long) sb->st_ino, sb->st_blocks); (void)strmode(sb->st_mode, modep); (void)printf("%s %3u %-*s %-*s ", modep, sb->st_nlink, UT_NAMESIZE, user_from_uid(sb->st_uid, 0), UT_NAMESIZE, @@ -79,7 +80,7 @@ printlong(name, accpath, sb) (void)printf("%3d, %3d ", major(sb->st_rdev), minor(sb->st_rdev)); else - (void)printf("%8qd ", sb->st_size); + (void)printf("%8"PRId64" ", sb->st_size); printtime(sb->st_mtime); (void)printf("%s", name); if (S_ISLNK(sb->st_mode)) -- cgit v1.1