clang reports reports errors (buildkernel _at_r241067)

From: David Wolfskill <david_at_catwhisker.org>
Date: Sun, 30 Sep 2012 06:04:48 -0700
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_at_ -I_at_/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_at_ -I_at_/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.

Received on Sun Sep 30 2012 - 11:04:54 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:40:31 UTC