Silence WARNS=2 and BDECFLAGS on i386 and alpha
MFC After: 1 week
This commit is contained in:
parent
feb8ba8e39
commit
3fb2565631
@ -3,4 +3,6 @@
|
||||
|
||||
PROG= hostname
|
||||
|
||||
WARNS= 2
|
||||
|
||||
.include <bsd.prog.mk>
|
||||
|
@ -53,6 +53,7 @@ static const char rcsid[] =
|
||||
#include <string.h>
|
||||
#include <unistd.h>
|
||||
|
||||
int main __P((int, char *[]));
|
||||
void usage __P((void));
|
||||
|
||||
int
|
||||
@ -80,10 +81,10 @@ main(argc,argv)
|
||||
usage();
|
||||
|
||||
if (*argv) {
|
||||
if (sethostname(*argv, strlen(*argv)))
|
||||
if (sethostname(*argv, (int)strlen(*argv)))
|
||||
err(1, "sethostname");
|
||||
} else {
|
||||
if (gethostname(hostname, sizeof(hostname)))
|
||||
if (gethostname(hostname, (int)sizeof(hostname)))
|
||||
err(1, "gethostname");
|
||||
if (sflag && (p = strchr(hostname, '.')))
|
||||
*p = '\0';
|
||||
|
@ -7,4 +7,6 @@ MAN= ln.1 symlink.7
|
||||
LINKS= ${BINDIR}/ln ${BINDIR}/link
|
||||
MLINKS= ln.1 link.1
|
||||
|
||||
WARNS= 2
|
||||
|
||||
.include <bsd.prog.mk>
|
||||
|
@ -64,7 +64,7 @@ int vflag; /* Verbose output. */
|
||||
int (*linkf) __P((const char *, const char *));
|
||||
char linkch;
|
||||
|
||||
int linkit __P((char *, char *, int));
|
||||
int linkit __P((const char *, const char *, int));
|
||||
int main __P((int, char *[]));
|
||||
void usage __P((void));
|
||||
|
||||
@ -74,8 +74,8 @@ main(argc, argv)
|
||||
char *argv[];
|
||||
{
|
||||
struct stat sb;
|
||||
int ch, exitval;
|
||||
char *p, *sourcedir;
|
||||
int ch, exitval;
|
||||
|
||||
/*
|
||||
* Test for the special case where the utility is called as
|
||||
@ -155,12 +155,13 @@ main(argc, argv)
|
||||
|
||||
int
|
||||
linkit(target, source, isdir)
|
||||
char *target, *source;
|
||||
const char *target, *source;
|
||||
int isdir;
|
||||
{
|
||||
struct stat sb;
|
||||
const char *p;
|
||||
char path[MAXPATHLEN];
|
||||
int ch, exists, first;
|
||||
char *p, path[MAXPATHLEN];
|
||||
|
||||
if (!sflag) {
|
||||
/* If target doesn't exist, quit now. */
|
||||
|
Loading…
Reference in New Issue
Block a user