On Fri, Sep 26, 2014 at 10:32:53PM -0400, thev...@openmailbox.org wrote:
> i don't know if this is considered a bug, so i sent it here instead.
> 
> found this when compiling with 'option APMDEBUG':
> cc  -Werror -Wall -Wstrict-prototypes -Wmissing-prototypes  -Wno-main 
> -Wno-uninitialized  -Wstack-larger-than-2047  -fno-builtin-printf 
> -fno-builtin-snprintf  -fno-builtin-vsnprintf -fno-builtin-log  
> -fno-builtin-log2 -fno-builtin-malloc -fno-pie -fno-stack-protector -Os 
> -mtune=i486 -pipe -nostdinc -I../../../.. -I. -I../../../../arch -DDEBUG 
> -DSCSITERSE -DSMALL_KERNEL -DNO_PROPOLICE -DTIMEZONE="0" -DDST="0" -DFFS 
> -DFFS2 -DEXT2FS -DNFSCLIENT -DCD9660 -DUDF -DMSDOSFS -DINET -DINET6 
> -DBOOT_CONFIG -DCRYPTO -DRAMDISK_HOOKS -DMINIROOTSIZE="0xf20" -DAPMDEBUG 
> -DPCIVERBOSE -DMAXUSERS=4 -D_KERNEL -MD -MP  -c 
> ../../../../arch/i386/i386/apm.c
> cc1: warnings being treated as errors
> ../../../../arch/i386/i386/apm.c: In function 'apmattach':
> ../../../../arch/i386/i386/apm.c:803: warning: format '%x' expects type 
> 'unsigned int', but argument 4 has type 'bus_space_handle_t'
> ../../../../arch/i386/i386/apm.c:803: warning: format '%x' expects type 
> 'unsigned int', but argument 7 has type 'bus_space_handle_t'
> ../../../../arch/i386/i386/apm.c:803: warning: format '%x' expects type 
> 'unsigned int', but argument 10 has type 'bus_space_handle_t'
> ../../../../arch/i386/i386/apm.c:803: warning: format '%x' expects type 
> 'unsigned int', but argument 14 has type 'long unsigned int'
> *** Error 1 in /usr/src/sys/arch/i386/compile/RAMDISK_CD (Makefile:655 
> 'apm.o')
> *** Error 1 in /usr/src/distrib/i386/ramdisk_cd (../common/Makefile.inc:73 
> 'bsd')
> 
> 
> --- apm.c.orig        Fri Sep 19 20:40:13 2014
> +++ apm.c     Fri Sep 26 22:14:00 2014
> @@ -800,8 +800,8 @@ apmattach(struct device *parent, struct device *self, 
>                   SDT_MEMERA, SEL_KPL, 0, 0);
>               setgdt(GAPMDATA_SEL, (void *)dh, ap->apm_data_len, SDT_MEMRWA,
>                   SEL_KPL, 1, 0);
> -             DPRINTF((": flags %x code 32:%x/%x[%x] 16:%x/%x[%x] "
> -                 "data %x/%x/%x ep %x (%x:%x)\n%s", apm_flags,
> +             DPRINTF((": flags %x code 32:%x/%lx[%x] 16:%x/%lx[%x] "
> +                 "data %x/%lx/%x ep %x (%x:%lx)\n%s", apm_flags,
>                   ap->apm_code32_base, ch32, ap->apm_code_len,
>                   ap->apm_code16_base, ch16, ap->apm_code16_len,
>                   ap->apm_data_base, dh, ap->apm_data_len,
> 

Thanks, committed.

Reply via email to