Date: Mon, 12 Jan 2015 17:19:10 +0000 From: bugzilla-noreply@freebsd.org To: freebsd-bugs@FreeBSD.org Subject: [Bug 196608] sys/x86/x86/busdma_machdep.c fails to compile with PAE Message-ID: <bug-196608-8@https.bugs.freebsd.org/bugzilla/>
next in thread | raw e-mail | index | archive | help
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=196608 Bug ID: 196608 Summary: sys/x86/x86/busdma_machdep.c fails to compile with PAE Product: Base System Version: 9.3-RELEASE Hardware: Any OS: Any Status: New Severity: Affects Only Me Priority: --- Component: bin Assignee: freebsd-bugs@FreeBSD.org Reporter: mi@ALDAN.algebra.com Trying to build kernel with the 9.3-STABLE sources as of today, I get: cc -c -O -pipe -march=prescott -std=c99 -g -Wall -Wredundant-decls -Wnested-externs -Wstrict-prototypes -Wmissing-prototypes -Wpointer-arith -Winline -Wcast-qual -Wundef -Wno-pointer-sign -fformat-extensions -Wmissing-include-dirs -fdiagnostics-show-option -nostdinc -I. -I/mi/src/sys -I/mi/src/sys/contrib/altq -D_KERNEL -DHAVE_KERNEL_OPTION_HEADERS -include opt_global.h -fno-common -finline-limit=8000 --param inline-unit-growth=100 --param large-function-growth=1000 -mno-align-long-strings -mpreferred-stack-boundary=2 -mno-mmx -mno-sse -msoft-float -ffreestanding -Werror /mi/src/sys/x86/x86/busdma_machdep.c cc1: warnings being treated as errors /mi/src/sys/x86/x86/busdma_machdep.c: In function 'alloc_bounce_zone': /mi/src/sys/x86/x86/busdma_machdep.c:1041: warning: initialization from incompatible pointer type The same error from clang is easier to understand: /mi/src/sys/x86/x86/busdma_machdep.c:1041:2: error: incompatible pointer types initializing 'uint64_t *' (aka 'unsigned long long *') with an expression of type 'bus_size_t *' (aka 'unsigned int *') [-Werror,-Wincompatible-pointer-types] SYSCTL_ADD_BUS_SIZE_T(busdma_sysctl_tree(bz), ^ /mi/src/sys/x86/x86/busdma_machdep.c:968:31: note: expanded from macro 'SYSCTL_ADD_BUS_SIZE_T' #define SYSCTL_ADD_BUS_SIZE_T SYSCTL_ADD_UQUAD ^ /mi/src/sys/sys/sysctl.h:394:12: note: expanded from macro 'SYSCTL_ADD_UQUAD' uint64_t *__ptr = (ptr); \ Patching sysctl.h to add explicit cast to the above assignment -- as the attached patch is doing -- allows the build to succeed and the resulting kernel seems to work (I'm typing this, am I not?), but it is, probably, not right on some level... The r273912, probably, had something to do with this... Environment: FreeBSD 9.3-RELEASE -- You are receiving this mail because: You are the assignee for the bug.
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-196608-8>