diff options
author | murray <murray@FreeBSD.org> | 2001-09-22 22:21:01 +0000 |
---|---|---|
committer | murray <murray@FreeBSD.org> | 2001-09-22 22:21:01 +0000 |
commit | 93c176a9ba87c7b1d3320c1ff435b492a61e6c28 (patch) | |
tree | 078b91d41f565e7375901975843e4fd4e65f5b6b | |
parent | 9426cdbe394ea7f3120f023fb356b022ba303fef (diff) | |
download | FreeBSD-src-93c176a9ba87c7b1d3320c1ff435b492a61e6c28.zip FreeBSD-src-93c176a9ba87c7b1d3320c1ff435b492a61e6c28.tar.gz |
Silence warnings :
Use static as necessary.
Use __unused as necessary.
sizeof(int) != sizeof(void *)
-rw-r--r-- | usr.sbin/sade/misc.c | 8 | ||||
-rw-r--r-- | usr.sbin/sade/sade.h | 2 | ||||
-rw-r--r-- | usr.sbin/sysinstall/anonFTP.c | 4 | ||||
-rw-r--r-- | usr.sbin/sysinstall/index.c | 11 | ||||
-rw-r--r-- | usr.sbin/sysinstall/misc.c | 8 | ||||
-rw-r--r-- | usr.sbin/sysinstall/sysinstall.h | 2 |
6 files changed, 19 insertions, 16 deletions
diff --git a/usr.sbin/sade/misc.c b/usr.sbin/sade/misc.c index 4bba7e5..0965828 100644 --- a/usr.sbin/sade/misc.c +++ b/usr.sbin/sade/misc.c @@ -189,7 +189,7 @@ safe_malloc(size_t size) void *ptr; if (size <= 0) - msgFatal("Invalid malloc size of %d!", size); + msgFatal("Invalid malloc size of %ld!", (long)size); ptr = malloc(size); if (!ptr) msgFatal("Out of memory!"); @@ -204,7 +204,7 @@ safe_realloc(void *orig, size_t size) void *ptr; if (size <= 0) - msgFatal("Invalid realloc size of %d!", size); + msgFatal("Invalid realloc size of %ld!", (long)size); ptr = realloc(orig, size); if (!ptr) msgFatal("Out of memory!"); @@ -236,7 +236,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, int *aux, int *curr, int *max) { dialogMenuItem *d; @@ -252,7 +252,7 @@ item_add(dialogMenuItem *list, char *prompt, char *title, d->fire = fire; d->selected = selected; d->data = data; - d->aux = aux; + d->aux = (long)aux; return list; } diff --git a/usr.sbin/sade/sade.h b/usr.sbin/sade/sade.h index 2b1a06d..c6e2b9b 100644 --- a/usr.sbin/sade/sade.h +++ b/usr.sbin/sade/sade.h @@ -658,7 +658,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, int *aux, int *curr, int *max); extern void items_free(dialogMenuItem *list, int *curr, int *max); extern int Mkdir(char *); extern int Mount(char *, void *data); diff --git a/usr.sbin/sysinstall/anonFTP.c b/usr.sbin/sysinstall/anonFTP.c index 7606be2..1902a5d 100644 --- a/usr.sbin/sysinstall/anonFTP.c +++ b/usr.sbin/sysinstall/anonFTP.c @@ -118,7 +118,7 @@ static Layout layout[] = { { NULL }, }; -int +static int createFtpUser(void) { struct passwd *tpw; @@ -235,7 +235,7 @@ anonftpOpenDialog(void) } int -configAnonFTP(dialogMenuItem *self) +configAnonFTP(dialogMenuItem *self __unused) { int i; diff --git a/usr.sbin/sysinstall/index.c b/usr.sbin/sysinstall/index.c index ae6f6e4..b3ca29e 100644 --- a/usr.sbin/sysinstall/index.c +++ b/usr.sbin/sysinstall/index.c @@ -576,8 +576,8 @@ index_menu(PkgNodePtr root, PkgNodePtr top, PkgNodePtr plist, int *pos, int *scr use_helpfile(NULL); kp = top->kids; if (!hasPackages && plist) { - nitems = item_add(nitems, "OK", NULL, NULL, NULL, NULL, NULL, 0, &curr, &max); - nitems = item_add(nitems, "Install", NULL, NULL, NULL, NULL, NULL, 0, &curr, &max); + nitems = item_add(nitems, "OK", NULL, NULL, NULL, NULL, NULL, NULL, &curr, &max); + nitems = item_add(nitems, "Install", NULL, NULL, NULL, NULL, NULL, NULL, &curr, &max); } while (kp && kp->name) { char buf[256]; @@ -590,12 +590,15 @@ 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, buf, pkg_checked, pkg_fire, pkg_selected, kp, (int)&lists, &curr, &max); + nitems = item_add(nitems, kp->name, (char *)buf, pkg_checked, + pkg_fire, pkg_selected, kp, (int *)(&lists), + &curr, &max); ++n; kp = kp->next; } /* NULL delimiter so item_free() knows when to stop later */ - nitems = item_add(nitems, NULL, NULL, NULL, NULL, NULL, NULL, 0, &curr, &max); + nitems = item_add(nitems, NULL, NULL, NULL, NULL, NULL, NULL, NULL, + &curr, &max); recycle: dialog_clear_norefresh(); diff --git a/usr.sbin/sysinstall/misc.c b/usr.sbin/sysinstall/misc.c index 4bba7e5..0965828 100644 --- a/usr.sbin/sysinstall/misc.c +++ b/usr.sbin/sysinstall/misc.c @@ -189,7 +189,7 @@ safe_malloc(size_t size) void *ptr; if (size <= 0) - msgFatal("Invalid malloc size of %d!", size); + msgFatal("Invalid malloc size of %ld!", (long)size); ptr = malloc(size); if (!ptr) msgFatal("Out of memory!"); @@ -204,7 +204,7 @@ safe_realloc(void *orig, size_t size) void *ptr; if (size <= 0) - msgFatal("Invalid realloc size of %d!", size); + msgFatal("Invalid realloc size of %ld!", (long)size); ptr = realloc(orig, size); if (!ptr) msgFatal("Out of memory!"); @@ -236,7 +236,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, int *aux, int *curr, int *max) { dialogMenuItem *d; @@ -252,7 +252,7 @@ item_add(dialogMenuItem *list, char *prompt, char *title, d->fire = fire; d->selected = selected; d->data = data; - d->aux = aux; + d->aux = (long)aux; return list; } diff --git a/usr.sbin/sysinstall/sysinstall.h b/usr.sbin/sysinstall/sysinstall.h index 2b1a06d..c6e2b9b 100644 --- a/usr.sbin/sysinstall/sysinstall.h +++ b/usr.sbin/sysinstall/sysinstall.h @@ -658,7 +658,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, int *aux, int *curr, int *max); extern void items_free(dialogMenuItem *list, int *curr, int *max); extern int Mkdir(char *); extern int Mount(char *, void *data); |