diff options
author | jhb <jhb@FreeBSD.org> | 2006-02-28 21:49:33 +0000 |
---|---|---|
committer | jhb <jhb@FreeBSD.org> | 2006-02-28 21:49:33 +0000 |
commit | 1ec49d602a80028377023a0fdc8f11d6281a3b18 (patch) | |
tree | 29ca37782709cff55cee2300ecd6319423660211 /usr.sbin/sysinstall/index.c | |
parent | 6dd5abcf92dd9a747d9ec038a372392b97daf728 (diff) | |
download | FreeBSD-src-1ec49d602a80028377023a0fdc8f11d6281a3b18.zip FreeBSD-src-1ec49d602a80028377023a0fdc8f11d6281a3b18.tar.gz |
Fix numerous warnings. Aside from menu items in system.c and menu.c
this now compiles on i386 with WARNS?= 3. Most of the fixes included
adding missing 'static' keywords to internal functions, using fully-defined
terminators in statically defined arrays of structs, and various
signed vs unsigned mismatches. Also G/C'd unused configSecurity()
function.
Diffstat (limited to 'usr.sbin/sysinstall/index.c')
-rw-r--r-- | usr.sbin/sysinstall/index.c | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/usr.sbin/sysinstall/index.c b/usr.sbin/sysinstall/index.c index 338f939..a20dfb4 100644 --- a/usr.sbin/sysinstall/index.c +++ b/usr.sbin/sysinstall/index.c @@ -60,7 +60,7 @@ static void index_recorddeps(Boolean add, PkgNodePtr root, IndexEntryPtr ie); PkgNode Top, Plist; /* Smarter strdup */ -inline char * +static inline char * _strdup(char *ptr) { return ptr ? strdup(ptr) : NULL; @@ -289,7 +289,7 @@ readline(FILE *fp, char *buf, int max) * lines without a set number of '|' delimited fields. */ -int +static int index_parse(FILE *fp, char *name, char *pathto, char *prefix, char *comment, char *descr, char *maint, char *cats, char *rdeps, int *volume) { char line[10240 + 2048 * 7]; @@ -437,7 +437,7 @@ index_sort(PkgNodePtr top) } /* Delete an entry out of the list it's in (only the plist, at present) */ -void +static void index_delete(PkgNodePtr n) { if (n->next) { @@ -482,7 +482,7 @@ index_search(PkgNodePtr top, char *str, PkgNodePtr *tp) return p; } -int +static int pkg_checked(dialogMenuItem *self) { ListPtrsPtr lists = (ListPtrsPtr)self->aux; @@ -502,7 +502,7 @@ pkg_checked(dialogMenuItem *self) return FALSE; } -int +static int pkg_fire(dialogMenuItem *self) { int ret; @@ -561,7 +561,7 @@ pkg_fire(dialogMenuItem *self) return ret; } -void +static void pkg_selected(dialogMenuItem *self, int is_selected) { PkgNodePtr kp = self->data; @@ -575,7 +575,8 @@ int index_menu(PkgNodePtr root, PkgNodePtr top, PkgNodePtr plist, int *pos, int *scroll) { struct ListPtrs lists; - int n, rval, maxname; + size_t maxname; + int n, rval; int curr, max; PkgNodePtr kp; dialogMenuItem *nitems; @@ -592,7 +593,7 @@ index_menu(PkgNodePtr root, PkgNodePtr top, PkgNodePtr plist, int *pos, int *scr /* Figure out if this menu is full of "leaves" or "branches" */ for (kp = top->kids; kp && kp->name; kp = kp->next) { - int len; + size_t len; ++n; if (kp->type == PACKAGE && plist) { |