From 3934765366e1e69a2849d378d8fcf18c44cdbcba Mon Sep 17 00:00:00 2001 From: randi Date: Sun, 20 Jun 2010 04:14:49 +0000 Subject: Clean up item_add and remove -fno-strict-aliasing from CFLAGS. Note that the "aux" value in libdialog is really an opaque pointer, but libdialog stores it as a long for historical reasons. Approved by: cperciva (mentor) --- usr.sbin/sysinstall/Makefile | 2 +- usr.sbin/sysinstall/index.c | 4 ++-- usr.sbin/sysinstall/misc.c | 2 +- usr.sbin/sysinstall/sysinstall.h | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/usr.sbin/sysinstall/Makefile b/usr.sbin/sysinstall/Makefile index eb0abec..152b524 100644 --- a/usr.sbin/sysinstall/Makefile +++ b/usr.sbin/sysinstall/Makefile @@ -14,7 +14,7 @@ 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 -fno-strict-aliasing +CFLAGS+= -DUSE_GZIP=1 .if ${MACHINE} == "pc98" CFLAGS+= -DPC98 .endif diff --git a/usr.sbin/sysinstall/index.c b/usr.sbin/sysinstall/index.c index f25a223..c591cfe 100644 --- a/usr.sbin/sysinstall/index.c +++ b/usr.sbin/sysinstall/index.c @@ -650,8 +650,8 @@ index_menu(PkgNodePtr root, PkgNodePtr top, PkgNodePtr plist, int *pos, int *scr SAFE_STRCPY(buf, kp->desc); if (strlen(buf) > (_MAX_DESC - maxname)) buf[_MAX_DESC - maxname] = '\0'; - nitems = item_add(nitems, kp->name, (char *)buf, pkg_checked, - pkg_fire, pkg_selected, kp, (int *)(&lists), + nitems = item_add(nitems, kp->name, buf, pkg_checked, + pkg_fire, pkg_selected, kp, &lists, &curr, &max); ++n; kp = kp->next; diff --git a/usr.sbin/sysinstall/misc.c b/usr.sbin/sysinstall/misc.c index c978b76..ed4fa2d 100644 --- a/usr.sbin/sysinstall/misc.c +++ b/usr.sbin/sysinstall/misc.c @@ -238,7 +238,7 @@ item_add(dialogMenuItem *list, char *prompt, char *title, int (*checked)(dialogMenuItem *self), int (*fire)(dialogMenuItem *self), void (*selected)(dialogMenuItem *self, int is_selected), - void *data, int *aux, int *curr, int *max) + void *data, void *aux, int *curr, int *max) { dialogMenuItem *d; diff --git a/usr.sbin/sysinstall/sysinstall.h b/usr.sbin/sysinstall/sysinstall.h index ba364c7..d3cb109 100644 --- a/usr.sbin/sysinstall/sysinstall.h +++ b/usr.sbin/sysinstall/sysinstall.h @@ -755,7 +755,7 @@ extern dialogMenuItem *item_add(dialogMenuItem *list, char *prompt, char *title, int (*checked)(dialogMenuItem *self), int (*fire)(dialogMenuItem *self), void (*selected)(dialogMenuItem *self, int is_selected), - void *data, int *aux, int *curr, int *max); + void *data, void *aux, int *curr, int *max); extern void items_free(dialogMenuItem *list, int *curr, int *max); extern int Mkdir(char *); extern int Mkdir_command(char *key, void *data); -- cgit v1.1