Error "misleading indentation" compiling the kernel

Michael Schuster michaelsprivate at gmail.com
Mon Jul 6 06:06:30 UTC 2020


On Sun, Jul 5, 2020 at 11:42 PM Juan Cuzmar via freebsd-questions <
freebsd-questions at freebsd.org> wrote:

> Hi!
>
> Im trying to compile my custom kernel but shows me this error:
>
> --- mrsas_cam.o ---
>
> cc -target x86_64-unknown-freebsd12.1
> --sysroot=/usr/obj/usr/src/amd64.amd64/tmp
> -B/usr/obj/usr/src/amd64.amd64/tmp/usr/bin -c -O2 -pipe
> -fno-strict-aliasing -march=native -g -nostdinc  -I. -I/usr/src/sys
> -I/usr/src/sys/contrib/ck/include -I/usr/src/sys/contrib/libfdt -D_KERNEL
> -DHAVE_KERNEL_OPTION_HEADERS -include opt_global.h  -fno-omit-frame-pointer
> -mno-omit-leaf-frame-pointer -MD  -MF.depend.mrsas_cam.o -MTmrsas_cam.o
> -fdebug-prefix-map=./machine=/usr/src/sys/amd64/include
> -fdebug-prefix-map=./x86=/usr/src/sys/x86/include -mcmodel=kernel
> -mno-red-zone -mno-mmx -mno-sse -msoft-float
> -fno-asynchronous-unwind-tables -ffreestanding -fwrapv -fstack-protector
> -gdwarf-2 -Wall -Wredundant-decls -Wnested-externs -Wstrict-prototypes
> -Wmissing-prototypes -Wpointer-arith -Wcast-qual -Wundef -Wno-pointer-sign
> -D__printf__=__freebsd_kprintf__ -Wmissing-include-dirs
> -fdiagnostics-show-option -Wno-unknown-pragmas
> -Wno-error-tautological-compare -Wno-error-empty-body
> -Wno-error-parentheses-equality -Wno-error-unused-function
> -Wno-error-pointer-sign -Wno-error-shift-negative-value
> -Wno-address-of-packed-member  -mno-aes -mno-avx  -std=iso9899:1999
> -Werror  /usr/src/sys/dev/mrsas/mrsas_cam.c
>
> /usr/src/sys/dev/mrsas/mrsas_cam.c:1919:4: error: misleading indentation;
> statement is not part of the previous 'if'
> [-Werror,-Wmisleading-indentation]
>
>                         if (mpt_cmd->ccb_ptr->cpi.bus_id == bus_id &&
>
>                         ^
>
> /usr/src/sys/dev/mrsas/mrsas_cam.c:1916:3: note: previous statement is here
>
>                 if (bus_id == 1)
>
>                 ^
>

a quick check in the latest current sources (AFAICT) doesn't show anything
obvious (no, I didn't build) - so either I'm missing it too, or perhaps you
need to update your sources and retry.

HTH
Michael
-- 
Michael Schuster
http://recursiveramblings.wordpress.com/
recursion, n: see 'recursion'


More information about the freebsd-questions mailing list