Hi Jürgen,
I tried that and also with some variations such as "CFLAGS+=-Wno-error" but nothing changes in the compiler output. I am compiling for Phycore-AM335x SOM, if that matters.
make[1]: Entering directory `/export/home/oyouwen/phyCORE-AM335x-PD13.1.2/platform-phyCORE-AM335x/build-target/libsepol_2.8'
make -C src
make[2]: Entering directory `/export/home/oyouwen/phyCORE-AM335x-PD13.1.2/platform-phyCORE-AM335x/build-target/libsepol_2.8/src'
cc -Werror -Wall -W -Wundef -Wshadow -Wmissing-format-attribute -O2 -I. -I../include -D_GNU_SOURCE -I../cil/include -fPIC -c -o assertion.o assertion.c
cc -Werror -Wall -W -Wundef -Wshadow -Wmissing-format-attribute -O2 -I. -I../include -D_GNU_SOURCE -I../cil/include -fPIC -c -o avrule_block.o avrule_block.c
cc -Werror -Wall -W -Wundef -Wshadow -Wmissing-format-attribute -O2 -I. -I../include -D_GNU_SOURCE -I../cil/include -fPIC -c -o avtab.o avtab.c
cc -Werror -Wall -W -Wundef -Wshadow -Wmissing-format-attribute -O2 -I. -I../include -D_GNU_SOURCE -I../cil/include -fPIC -c -o boolean_record.o boolean_record.c
cc -Werror -Wall -W -Wundef -Wshadow -Wmissing-format-attribute -O2 -I. -I../include -D_GNU_SOURCE -I../cil/include -fPIC -c -o booleans.o booleans.c
...
cc -Werror -Wall -W -Wundef -Wshadow -Wmissing-format-attribute -O2 -I. -I../include -D_GNU_SOURCE -I../cil/include -fPIC -c -o interfaces.o interfaces.c
cc -Werror -Wall -W -Wundef -Wshadow -Wmissing-format-attribute -O2 -I. -I../include -D_GNU_SOURCE -I../cil/include -fPIC -c -o kernel_to_cil.o kernel_to_cil.c
cc -Werror -Wall -W -Wundef -Wshadow -Wmissing-format-attribute -O2 -I. -I../include -D_GNU_SOURCE -I../cil/include -fPIC -c -o kernel_to_common.o kernel_to_common.c
kernel_to_common.c: In function 'strs_add_at_index':
kernel_to_common.c:212:60: error: declaration of 'index' shadows a global declaration [-Werror=shadow]
kernel_to_common.c: In function 'strs_read_at_index':
kernel_to_common.c:237:54: error: declaration of 'index' shadows a global declaration [-Werror=shadow]
cc1: all warnings being treated as errors
make[2]: *** [kernel_to_common.o] Error 1
make[2]: *** Waiting for unfinished jobs....
Regards,
You Wen