Fix to WARNS=2 level.

Tested by:	AXP gcc 3.1
This commit is contained in:
David E. O'Brien 2002-04-15 19:27:41 +00:00
parent e789153cfc
commit 5e28140a6b
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=94792
3 changed files with 8 additions and 25 deletions

View File

@ -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>

View File

@ -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;
}

View File

@ -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))