summaryrefslogtreecommitdiffstats
path: root/usr.bin/find
diff options
context:
space:
mode:
authorobrien <obrien@FreeBSD.org>2002-04-15 19:27:41 +0000
committerobrien <obrien@FreeBSD.org>2002-04-15 19:27:41 +0000
commit37b32352481728a8159afc1804e450d4937319ef (patch)
tree5e46aed8da5b57de5ddd575f07b1226e86bb3bf8 /usr.bin/find
parent45c5bb7593086008b5aa0bc0233767688c1af148 (diff)
downloadFreeBSD-src-37b32352481728a8159afc1804e450d4937319ef.zip
FreeBSD-src-37b32352481728a8159afc1804e450d4937319ef.tar.gz
Fix to WARNS=2 level.
Tested by: AXP gcc 3.1
Diffstat (limited to 'usr.bin/find')
-rw-r--r--usr.bin/find/Makefile3
-rw-r--r--usr.bin/find/getdate.y25
-rw-r--r--usr.bin/find/ls.c5
3 files changed, 8 insertions, 25 deletions
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 <bsd.prog.mk>
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 <config.h>
-#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 <stdio.h>
#include <ctype.h>
@@ -44,12 +26,11 @@
# include <types.h>
#else /* defined(vms) */
# include <sys/types.h>
-/*# include "xtime.h"*/
# include <sys/time.h>
# include <sys/timeb.h>
#endif /* !defined(vms) */
-#if defined (STDC_HEADERS) || defined (USG)
+#if defined (__STDC__) || defined (USG)
#include <string.h>
#endif
@@ -60,7 +41,7 @@
#define bcopy(from, to, len) memcpy ((to), (from), (len))
#endif
-#if defined (STDC_HEADERS)
+#if defined (__STDC__)
#include <stdlib.h>
#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 <sys/param.h>
#include <sys/stat.h>
+#include <inttypes.h>
#include <err.h>
#include <errno.h>
#include <fts.h>
@@ -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))
OpenPOWER on IntegriCloud