summaryrefslogtreecommitdiffstats
path: root/bin/hostname
diff options
context:
space:
mode:
authorkris <kris@FreeBSD.org>2001-05-20 04:54:15 +0000
committerkris <kris@FreeBSD.org>2001-05-20 04:54:15 +0000
commit87fe6c7de032e5872bc35efed230a204f27fe2f8 (patch)
treed293621382fc57b2d0c8b17b0434e4372401f110 /bin/hostname
parentbc311d5aefc06707cbfb2f96988dc353a98b2d91 (diff)
downloadFreeBSD-src-87fe6c7de032e5872bc35efed230a204f27fe2f8.zip
FreeBSD-src-87fe6c7de032e5872bc35efed230a204f27fe2f8.tar.gz
Silence WARNS=2 and BDECFLAGS on i386 and alpha
MFC After: 1 week
Diffstat (limited to 'bin/hostname')
-rw-r--r--bin/hostname/Makefile2
-rw-r--r--bin/hostname/hostname.c5
2 files changed, 5 insertions, 2 deletions
diff --git a/bin/hostname/Makefile b/bin/hostname/Makefile
index 3c7997f..5503b35 100644
--- a/bin/hostname/Makefile
+++ b/bin/hostname/Makefile
@@ -3,4 +3,6 @@
PROG= hostname
+WARNS= 2
+
.include <bsd.prog.mk>
diff --git a/bin/hostname/hostname.c b/bin/hostname/hostname.c
index 94e5d4a..4fc5099 100644
--- a/bin/hostname/hostname.c
+++ b/bin/hostname/hostname.c
@@ -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';
OpenPOWER on IntegriCloud