summaryrefslogtreecommitdiff
path: root/sys/arch/sparc64
diff options
context:
space:
mode:
authorMiod Vallat <miod@cvs.openbsd.org>2014-07-06 12:13:19 +0000
committerMiod Vallat <miod@cvs.openbsd.org>2014-07-06 12:13:19 +0000
commit802986f1382e919dca2869d36ea1f0143d241edb (patch)
tree344045297cf9f83a372856d8a99d8a6a4d616a6d /sys/arch/sparc64
parent4797c9067778a3b6df0e347d0265ab968b912bb0 (diff)
Build with -Wall. Make sure main() returns zero.
(found the hard way by building with -fstack-shuffle)
Diffstat (limited to 'sys/arch/sparc64')
-rw-r--r--sys/arch/sparc64/stand/installboot/Makefile3
-rw-r--r--sys/arch/sparc64/stand/installboot/installboot.c12
2 files changed, 7 insertions, 8 deletions
diff --git a/sys/arch/sparc64/stand/installboot/Makefile b/sys/arch/sparc64/stand/installboot/Makefile
index 16a0ee3f17c..c33955d04db 100644
--- a/sys/arch/sparc64/stand/installboot/Makefile
+++ b/sys/arch/sparc64/stand/installboot/Makefile
@@ -1,4 +1,4 @@
-# $OpenBSD: Makefile,v 1.8 2013/12/27 22:08:37 deraadt Exp $
+# $OpenBSD: Makefile,v 1.9 2014/07/06 12:13:18 miod Exp $
# $NetBSD: Makefile,v 1.13 2000/08/16 08:24:01 mrg Exp $
.include <bsd.own.mk>
@@ -11,6 +11,7 @@ PROG= installboot
SRCS= installboot.c
LDADD= -lutil
DPADD= ${LIBUTIL}
+CFLAGS+= -Wall
.else
NOPROG=
.endif
diff --git a/sys/arch/sparc64/stand/installboot/installboot.c b/sys/arch/sparc64/stand/installboot/installboot.c
index 601456162f2..43170522c88 100644
--- a/sys/arch/sparc64/stand/installboot/installboot.c
+++ b/sys/arch/sparc64/stand/installboot/installboot.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: installboot.c,v 1.17 2013/09/29 21:30:50 jmc Exp $ */
+/* $OpenBSD: installboot.c,v 1.18 2014/07/06 12:13:18 miod Exp $ */
/* $NetBSD: installboot.c,v 1.8 2001/02/19 22:48:59 cgd Exp $ */
/*-
@@ -34,6 +34,7 @@
#include <sys/param.h>
#include <sys/disklabel.h>
#include <sys/dkio.h>
+#include <sys/ioctl.h>
#include <sys/mman.h>
#include <sys/stat.h>
#include <sys/time.h>
@@ -144,6 +145,8 @@ main(int argc, char *argv[])
}
close(devfd);
+
+ return 0;
}
static void
@@ -211,9 +214,7 @@ static void
sr_installboot(int devfd)
{
struct bioc_installboot bb;
- struct stat sb;
- int fd, i, rv;
- u_char *p;
+ int rv;
/*
* Install boot loader into softraid boot loader storage area.
@@ -237,9 +238,6 @@ static void
sr_install_bootblk(int devfd, int vol, int disk)
{
struct bioc_disk bd;
- struct disklabel dl;
- struct partition *pp;
- uint32_t poffset;
char *realdev;
char part;
int diskfd;