kern/164203: usr/src/sys/sys/smp.h:124: warning: comparison between
signed and unsigned
Oliver
grimeton at gmx.net
Mon Jan 16 15:50:09 UTC 2012
>Number: 164203
>Category: kern
>Synopsis: usr/src/sys/sys/smp.h:124: warning: comparison between signed and unsigned
>Confidential: no
>Severity: non-critical
>Priority: medium
>Responsible: freebsd-bugs
>State: open
>Quarter:
>Keywords:
>Date-Required:
>Class: sw-bug
>Submitter-Id: current-users
>Arrival-Date: Mon Jan 16 15:50:09 UTC 2012
>Closed-Date:
>Last-Modified:
>Originator: Oliver
>Release: 9.0-RELEASE
>Organization:
n/a
>Environment:
FreeBSD test 9.0-RELEASE FreeBSD 9.0-RELEASE #0: Tue Jan 3 07:46:30 UTC 2012 root at farrell.cse.buffalo.edu:/usr/obj/usr/src/sys/GENERIC amd64
>Description:
Hello,
I'm trying to build VirtualBox on 9.0-Release and get the following warning:
=======8<=====SNIP==========
In file included from /opt/vbox/VirtualBox-4.1.8_OSE/src/VBox/Runtime/r0drv/freebsd/the-freebsd-kernel.h:57,
from /opt/vbox/VirtualBox-4.1.8_OSE/src/VBox/Runtime/r0drv/freebsd/memobj-r0drv-freebsd.c:35:
/usr/src/sys/sys/smp.h: In function 'cpu_next':
/usr/src/sys/sys/smp.h:124: warning: comparison between signed and unsigned
In file included from /opt/vbox/VirtualBox-4.1.8_OSE/src/VBox/Runtime/r0drv/freebsd/the-freebsd-kernel.h:57,
from /opt/vbox/VirtualBox-4.1.8_OSE/src/VBox/Runtime/r0drv/freebsd/process-r0drv-freebsd.c:34:
/usr/src/sys/sys/smp.h: In function 'cpu_next':
/usr/src/sys/sys/smp.h:124: warning: comparison between signed and unsigned
/opt/vbox/VirtualBox-4.1.8_OSE/src/VBox/Runtime/r0drv/freebsd/memobj-r0drv-freebsd.c: In function 'rtR0MemObjFreeBSDPhysPageInit':
/opt/vbox/VirtualBox-4.1.8_OSE/src/VBox/Runtime/r0drv/freebsd/memobj-r0drv-freebsd.c:398: error: 'PG_UNMANAGED' undeclared (first use in this function)
/opt/vbox/VirtualBox-4.1.8_OSE/src/VBox/Runtime/r0drv/freebsd/memobj-r0drv-freebsd.c:398: error: (Each undeclared identifier is reported only once
/opt/vbox/VirtualBox-4.1.8_OSE/src/VBox/Runtime/r0drv/freebsd/memobj-r0drv-freebsd.c:398: error: for each function it appears in.)
In file included from /opt/vbox/VirtualBox-4.1.8_OSE/src/VBox/Runtime/r0drv/freebsd/the-freebsd-kernel.h:57,
from /opt/vbox/VirtualBox-4.1.8_OSE/src/VBox/Runtime/r0drv/freebsd/semevent-r0drv-freebsd.c:35:
/usr/src/sys/sys/smp.h: In function 'cpu_next':
/usr/src/sys/sys/smp.h:124: warning: comparison between signed and unsigned
kmk: *** [/opt/vbox/VirtualBox-4.1.8_OSE/out/freebsd.amd64/release/obj/RuntimeR0Drv/r0drv/freebsd/memobj-r0drv-freebsd.o] Error 1
=========>8=========SNAP=============
I checked /usr/src/sys/sys/smp.h and can see that mp_maxid is declared as extern u_int. But I'm not sure if this is a compiler problem or just a wrong declaration on line 124, for cpu_next(int i).
If it's changed to cpu_next(u_int i) it works, and virtualbox compiles and works too.
Thanks.
KR,
Grimeton
>How-To-Repeat:
- Install 9.0-RELEASE
- Install src.txz from your fav. server
- Get VirtualBox 4.1.8 sources from www.virtualbox.org
- configure and build virtualbox and see the error message from above
>Fix:
One can change the delaration of cpu_next() to cpu_next(u_int i).
>Release-Note:
>Audit-Trail:
>Unformatted:
More information about the freebsd-bugs
mailing list