From 49bc38beb2d10a82bd30e96de47da1f3a69b32b5 Mon Sep 17 00:00:00 2001 From: Randi Harper Date: Fri, 11 Jun 2010 20:56:40 +0000 Subject: Make sysinstall WARNS=2 clean. Approved by: cperciva (mentor) MFC after: 1 month --- usr.sbin/sysinstall/Makefile | 4 ++-- usr.sbin/sysinstall/install.c | 1 - usr.sbin/sysinstall/installUpgrade.c | 2 +- usr.sbin/sysinstall/media.c | 4 ++-- usr.sbin/sysinstall/system.c | 2 +- usr.sbin/sysinstall/tcpip.c | 1 - 6 files changed, 6 insertions(+), 8 deletions(-) (limited to 'usr.sbin') diff --git a/usr.sbin/sysinstall/Makefile b/usr.sbin/sysinstall/Makefile index bd08ac1dbe45..eb0abec489a3 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 ac2280311f75..5418bdf00c6f 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 1844c3122c24..82569f633a8a 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 b325323c613b..fe89d705cefb 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 a0e60d062e17..ce1aa4b61b2a 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 453781532355..a795d057faa7 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) -- cgit v1.2.3