>Number: 172542 >Category: bin >Synopsis: [patch] FICL assumes standalone environment for testmain >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Tue Oct 09 22:30:22 UTC 2012 >Closed-Date: >Last-Modified: >Originator: Peter Jeremy >Release: FreeBSD 8.3-STABLE amd64 >Organization: n/a >Environment: System: FreeBSD server.rulingia.com 8.3-STABLE FreeBSD 8.3-STABLE #18 r237444M: Sun Jul 8 10:47:08 EST 2012 r...@server.rulingia.com:/var/obj/usr/src/sys/server amd64
>Description: When ficl is compiled as a userland program via "make testmain", loader.c reports a number of warnings (and -Wall adds more) because required header files are missing from the TESTMAIN case. A number of auto variables are also declared incorrectly relative to '#ifdef TESTMAIN' blocks. >How-To-Repeat: # cd /sys/boot/ficl # make testmain note warnings when compiling loader.c >Fix: Index: sys/boot/ficl/loader.c =================================================================== --- sys/boot/ficl/loader.c (revision 241347) +++ sys/boot/ficl/loader.c (working copy) @@ -34,10 +34,14 @@ #ifdef TESTMAIN #include <stdlib.h> +#include <unistd.h> +#include <fcntl.h> +#include <stdio.h> +#include <time.h> #else #include <stand.h> +#include "bootstrap.h" #endif -#include "bootstrap.h" #include <string.h> #include "ficl.h" @@ -135,9 +139,9 @@ ficlGetenv(FICL_VM *pVM) { #ifndef TESTMAIN - char *name; + char *name, *value; #endif - char *namep, *value; + char *namep; int names; #if FICL_ROBUST > 1 @@ -243,9 +247,9 @@ ficlFindfile(FICL_VM *pVM) { #ifndef TESTMAIN - char *name; + char *type, *name; #endif - char *type, *namep, *typep; + char *namep, *typep; struct preloaded_file* fp; int names, types; >Release-Note: >Audit-Trail: >Unformatted: _______________________________________________ freebsd-bugs@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-bugs To unsubscribe, send any mail to "freebsd-bugs-unsubscr...@freebsd.org"