Date: Mon, 2 Jan 2012 07:47:58 GMT From: Garrett Cooper <yanegomi@gmail.com> To: freebsd-gnats-submit@FreeBSD.org Subject: misc/163768: [patch] fix non-ficl compile time warnings Message-ID: <201201020747.q027lvhZ010581@red.freebsd.org> Resent-Message-ID: <201201020750.q027oDEc015021@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
>Number: 163768 >Category: misc >Synopsis: [patch] fix non-ficl compile time warnings >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: Mon Jan 02 07:50:13 UTC 2012 >Closed-Date: >Last-Modified: >Originator: Garrett Cooper >Release: 9.0-PRERELEASE >Organization: n/a >Environment: FreeBSD bayonetta.local 9.0-PRERELEASE FreeBSD 9.0-PRERELEASE #0 r229187M: Sun Jan 1 14:39:27 PST 2012 gcooper@bayonetta.local:/usr/obj/store/freebsd/stable/9/sys/BAYONETTA amd64 >Description: The attached patch fixes a handful of non-ficl boot related compile time warnings, s.t. -Werror can be enabled in sys/boot/Makefile.inc . >How-To-Repeat: >Fix: Patch attached with submission follows: Index: lib/libstand/stand.h =================================================================== --- lib/libstand/stand.h (revision 229264) +++ lib/libstand/stand.h (working copy) @@ -399,4 +399,12 @@ #define realloc(x, y) Realloc(x, y, NULL, 0) #endif +struct iodesc; + +#ifdef OLD_NFSV2 +int nfs_getrootfh(struct iodesc*, char*, u_char*); +#else +int nfs_getrootfh(struct iodesc*, char*, uint32_t*, u_char*); +#endif + #endif /* STAND_H */ Index: sys/boot/Makefile.inc =================================================================== --- sys/boot/Makefile.inc (revision 229264) +++ sys/boot/Makefile.inc (working copy) @@ -1,3 +1,5 @@ # $FreeBSD$ SSP_CFLAGS= + +CFLAGS+= -Werror Index: sys/boot/efi/libefi/efipart.c =================================================================== --- sys/boot/efi/libefi/efipart.c (revision 229264) +++ sys/boot/efi/libefi/efipart.c (working copy) @@ -87,7 +87,8 @@ nout = 0; for (n = 0; n < nin; n++) { - status = BS->HandleProtocol(hin[n], &blkio_guid, &blkio); + status = BS->HandleProtocol(hin[n], &blkio_guid, + (VOID**)&blkio); if (EFI_ERROR(status)) continue; if (!blkio->Media->LogicalPartition) @@ -115,7 +116,7 @@ sprintf(line, " %s%d:", efipart_dev.dv_name, unit); pager_output(line); - status = BS->HandleProtocol(h, &blkio_guid, &blkio); + status = BS->HandleProtocol(h, &blkio_guid, (VOID**)&blkio); if (!EFI_ERROR(status)) { sprintf(line, " %llu blocks", (unsigned long long)(blkio->Media->LastBlock + 1)); @@ -144,7 +145,7 @@ if (h == NULL) return (EINVAL); - status = BS->HandleProtocol(h, &blkio_guid, &blkio); + status = BS->HandleProtocol(h, &blkio_guid, (VOID**)&blkio); if (EFI_ERROR(status)) return (efi_status_to_errno(status)); Index: sys/boot/i386/libi386/devicename.c =================================================================== --- sys/boot/i386/libi386/devicename.c (revision 229264) +++ sys/boot/i386/libi386/devicename.c (working copy) @@ -27,6 +27,7 @@ #include <sys/cdefs.h> __FBSDID("$FreeBSD$"); +#include <sys/cdefs.h> #include <stand.h> #include <string.h> #include <sys/disklabel.h> @@ -155,7 +156,7 @@ } #endif } else { - cp = np; + cp = __DECONST(char*, np); } if (*cp && (*cp != ':')) { err = EINVAL; @@ -181,7 +182,7 @@ goto fail; } } else { - cp = np; + cp = __DECONST(char*, np); } if (*cp && (*cp != ':')) { err = EINVAL; Index: sys/boot/i386/efi =================================================================== --- sys/boot/i386/efi (revision 229264) +++ sys/boot/i386/efi (working copy) Property changes on: sys/boot/i386/efi ___________________________________________________________________ Modified: svn:mergeinfo Reverse-merged /head/sys/boot/i386/efi:r226549-226554,226568-226569 Index: sys/boot/userboot/userboot/bootinfo32.c =================================================================== --- sys/boot/userboot/userboot/bootinfo32.c (revision 229264) +++ sys/boot/userboot/userboot/bootinfo32.c (working copy) @@ -143,7 +143,7 @@ vm_offset_t size; vm_offset_t ssym, esym; char *rootdevname; - int bootdevnr, i, howto; + int bootdevnr, howto; char *kernelname; const char *kernelpath; @@ -251,7 +251,7 @@ /* * Copy the legacy bootinfo and kernel name to the guest at 0x2000 */ - bi.bi_kernelname = (char *) (0x2000 + sizeof(bi)); + bi.bi_kernelname = (uint32_t) (0x2000 + sizeof(bi)); CALLBACK(copyin, &bi, 0x2000, sizeof(bi)); CALLBACK(copyin, kernelname, 0x2000 + sizeof(bi), strlen(kernelname) + 1); >Release-Note: >Audit-Trail: >Unformatted:
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201201020747.q027lvhZ010581>