clang reports reports errors (buildkernel @r241067)

David Wolfskill david at catwhisker.org
Sun Sep 30 13:04:54 UTC 2012


E.g.:

...
===> bios (all)
===> bios/smapi (all)
ctfconvert -L VERSION -g hdacc.o
clang -O2 -pipe -fno-strict-aliasing -D_KERNEL -DKLD_MODULE -nostdinc   -DHAVE_KERNEL_OPTION_HEADERS -include /common/S4/obj/usr/src/sys/CANARY/opt_global.h -I. -I@ -I@/contrib/altq -fno-common -g -I/common/S4/obj/usr/src/sys/CANARY  -mno-aes -mno-avx -mno-mmx -mno-sse -msoft-float -ffreestanding -fstack-protector -std=iso9899:1999 -Qunused-arguments -fstack-protector -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  -Wno-error-tautological-compare -Wno-error-empty-body  -Wno-error-parentheses-equality -no-integrated-as  -c /usr/src/sys/modules/bios/smapi/../../../i386/bios/smapi_bios.S
clang -c -O -pipe  -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  -Wno-error-tautological-compare -Wno-error-empty-body  -Wno-error-parentheses-equality -nostdinc  -I. -I/usr/src/sys -I/usr/src/sys/contrib/altq -D_KERNEL -DHAVE_KERNEL_OPTION_HEADERS -include opt_global.h  -mno-aes -mno-avx -mno-mmx -mno-sse -msoft-float -ffreestanding -fstack-protector -Werror  /usr/src/sys/dev/sound/pcm/ac97.c
ctfconvert -L VERSION -g smapi_bios.o
ctfconvert -L VERSION -g ac97.o
clang -O2 -pipe -fno-strict-aliasing -D_KERNEL -DKLD_MODULE -nostdinc   -DHAVE_KERNEL_OPTION_HEADERS -include /common/S4/obj/usr/src/sys/CANARY/opt_global.h -I. -I@ -I@/contrib/altq -fno-common -g -I/common/S4/obj/usr/src/sys/CANARY  -mno-aes -mno-avx -mno-mmx -mno-sse -msoft-float -ffreestanding -fstack-protector -std=iso9899:1999 -Qunused-arguments -fstack-protector -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  -Wno-error-tautological-compare -Wno-error-empty-body  -Wno-error-parentheses-equality  -c /usr/src/sys/modules/bios/smapi/../../../i386/bios/smapi.c
ctfconvert -L VERSION -g hdac.o
/usr/src/sys/modules/bios/smapi/../../../i386/bios/smapi.c:295:3: warning: implicit declaration of function 'free' is invalid in C99 [-Wimplicit-function-declaration]
                free(devs, M_TEMP);
                ^
/usr/src/sys/modules/bios/smapi/../../../i386/bios/smapi.c:295:14: error: use of undeclared identifier 'M_TEMP'
                free(devs, M_TEMP);
                           ^
1 warning and 1 error generated.
clang -c -O -pipe  -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  -Wno-error-tautological-compare -Wno-error-empty-body  -Wno-error-parentheses-equality -nostdinc  -I. -I/usr/src/sys -I/usr/src/sys/contrib/altq -D_KERNEL -DHAVE_KERNEL_OPTION_HEADERS -include opt_global.h  -mno-aes -mno-avx -mno-mmx -mno-sse -msoft-float -ffreestanding -fstack-protector -Werror  /usr/src/sys/dev/sound/pcm/ac97_patch.c
*** [smapi.o] Error code 1
1 error
*** [all] Error code 2
1 error
*** [all] Error code 2
1 error
*** [modules-all] Error code 2
clang -c -O -pipe  -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  -Wno-error-tautological-compare -Wno-error-empty-body  -Wno-error-parentheses-equality -nostdinc  -I. -I/usr/src/sys -I/usr/src/sys/contrib/altq -D_KERNEL -DHAVE_KERNEL_OPTION_HEADERS -include opt_global.h  -mno-aes -mno-avx -mno-mmx -mno-sse -msoft-float -ffreestanding -fstack-protector -Werror  /usr/src/sys/dev/sound/pcm/channel.c
ctfconvert -L VERSION -g ac97_patch.o
ctfconvert -L VERSION -g channel.o
ctfconvert -L VERSION -g hdaa.o
1 error
*** [buildkernel] Error code 2
1 error
*** [buildkernel] Error code 2
1 error


It looks to me as if sys/i386/bios/smapi.c lacks

#include <sys/types.h>
#include <sys/malloc.h>

(ref. free(9)) -- but I'm not all that much of a kernel hacker, so
I may well be off-base here.

Peace,
david
-- 
David H. Wolfskill				david at catwhisker.org
Depriving a girl or boy of an opportunity for education is evil.

See http://www.catwhisker.org/~david/publickey.gpg for my public key.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 196 bytes
Desc: not available
Url : http://lists.freebsd.org/pipermail/freebsd-current/attachments/20120930/2d9091e8/attachment.pgp


More information about the freebsd-current mailing list