summaryrefslogtreecommitdiffstats
path: root/usr.sbin
diff options
context:
space:
mode:
authorrandi <randi@FreeBSD.org>2010-06-11 20:56:40 +0000
committerrandi <randi@FreeBSD.org>2010-06-11 20:56:40 +0000
commit562fa6d72241d0f2d235613ea0772e60b54d7235 (patch)
tree0c56849046a78b11d918c0d1fef033537af36f52 /usr.sbin
parent9858f3bc4c35be50f67da27521c73f26b6b6bd3a (diff)
downloadFreeBSD-src-562fa6d72241d0f2d235613ea0772e60b54d7235.zip
FreeBSD-src-562fa6d72241d0f2d235613ea0772e60b54d7235.tar.gz
Make sysinstall WARNS=2 clean.
Approved by: cperciva (mentor) MFC after: 1 month
Diffstat (limited to 'usr.sbin')
-rw-r--r--usr.sbin/sysinstall/Makefile4
-rw-r--r--usr.sbin/sysinstall/install.c1
-rw-r--r--usr.sbin/sysinstall/installUpgrade.c2
-rw-r--r--usr.sbin/sysinstall/media.c4
-rw-r--r--usr.sbin/sysinstall/system.c2
-rw-r--r--usr.sbin/sysinstall/tcpip.c1
6 files changed, 6 insertions, 8 deletions
diff --git a/usr.sbin/sysinstall/Makefile b/usr.sbin/sysinstall/Makefile
index bd08ac1..eb0abec 100644
--- a/usr.sbin/sysinstall/Makefile
+++ b/usr.sbin/sysinstall/Makefile
@@ -14,13 +14,13 @@ SRCS= anonFTP.c cdrom.c command.c config.c devices.c dhcp.c \
system.c tcpip.c termcap.c ttys.c ufs.c usb.c user.c \
variable.c ${_wizard} keymap.h countries.h
-CFLAGS+= -DUSE_GZIP=1
+CFLAGS+= -DUSE_GZIP=1 -fno-strict-aliasing
.if ${MACHINE} == "pc98"
CFLAGS+= -DPC98
.endif
CFLAGS+= -I${.CURDIR}/../../gnu/lib/libdialog -I.
-WARNS?= 1
+WARNS?= 2
DPADD= ${LIBDIALOG} ${LIBNCURSES} ${LIBUTIL} ${LIBDISK} ${LIBFTPIO}
LDADD= -ldialog -lncurses -lutil -ldisk -lftpio
diff --git a/usr.sbin/sysinstall/install.c b/usr.sbin/sysinstall/install.c
index ac22803..5418bdf 100644
--- a/usr.sbin/sysinstall/install.c
+++ b/usr.sbin/sysinstall/install.c
@@ -357,7 +357,6 @@ installFixitUSB(dialogMenuItem *self)
int
installFixitCDROM(dialogMenuItem *self)
{
- struct stat sb;
int need_eject;
if (!RunningAsInit)
diff --git a/usr.sbin/sysinstall/installUpgrade.c b/usr.sbin/sysinstall/installUpgrade.c
index 1844c31..82569f6 100644
--- a/usr.sbin/sysinstall/installUpgrade.c
+++ b/usr.sbin/sysinstall/installUpgrade.c
@@ -368,7 +368,7 @@ media:
"Next comes stage 2, where we attempt to resurrect your /etc\n"
"directory!");
- if (saved_etc && chdir(saved_etc)) {
+ if (chdir(saved_etc)) {
msgConfirm("Unable to go to your saved /etc directory in %s?! Argh!\n"
"Something went seriously wrong! It's quite possible that\n"
"your former /etc is toast. I hope you didn't have any\n"
diff --git a/usr.sbin/sysinstall/media.c b/usr.sbin/sysinstall/media.c
index b325323..fe89d70 100644
--- a/usr.sbin/sysinstall/media.c
+++ b/usr.sbin/sysinstall/media.c
@@ -350,7 +350,7 @@ mediaSetFTP(dialogMenuItem *self)
}
urllen = strlen(cp);
if (urllen >= sizeof(ftpDevice.name)) {
- msgConfirm("Length of specified URL is %d characters. Allowable maximum is %d.",
+ msgConfirm("Length of specified URL is %zu characters. Allowable maximum is %zu.",
urllen,sizeof(ftpDevice.name)-1);
variable_unset(VAR_FTP_PATH);
return DITEM_FAILURE;
@@ -563,7 +563,7 @@ mediaSetNFS(dialogMenuItem *self)
}
pathlen = strlen(hostname);
if (pathlen >= sizeof(nfsDevice.name)) {
- msgConfirm("Length of specified NFS path is %d characters. Allowable maximum is %d.",
+ msgConfirm("Length of specified NFS path is %zu characters. Allowable maximum is %zu.",
pathlen,sizeof(nfsDevice.name)-1);
variable_unset(VAR_NFS_PATH);
return DITEM_FAILURE;
diff --git a/usr.sbin/sysinstall/system.c b/usr.sbin/sysinstall/system.c
index a0e60d0..ce1aa4b 100644
--- a/usr.sbin/sysinstall/system.c
+++ b/usr.sbin/sysinstall/system.c
@@ -524,7 +524,7 @@ systemCreateHoloshell(void)
printf("Type ``exit'' in this fixit shell to resume sysinstall.\n\n");
fflush(stdout);
}
- execlp("sh", "-sh", 0);
+ execlp("sh", "-sh", NULL);
msgDebug("Was unable to execute sh for Holographic shell!\n");
exit(1);
}
diff --git a/usr.sbin/sysinstall/tcpip.c b/usr.sbin/sysinstall/tcpip.c
index 4537815..a795d05 100644
--- a/usr.sbin/sysinstall/tcpip.c
+++ b/usr.sbin/sysinstall/tcpip.c
@@ -649,7 +649,6 @@ tcpDeviceScan(void)
int s;
struct ifmediareq ifmr;
struct ifaddrs *ifap, *ifa;
- struct if_data *ifd;
char *network_dev;
if ((s = socket(AF_LOCAL, SOCK_DGRAM, 0)) < 0)
OpenPOWER on IntegriCloud