I am trying to build ardupilot main branch on Arch Linux.
I am able to setup environment and configure using waf. But I am always getting compilation error related to misleading-indentation because -Werror is enabled.
[1/1] ChibiOS: Compiling fatfs_diskio.c
../../modules/ChibiOS/os/various/fatfs_bindings/fatfs_diskio.c: In function 'disk_write':
../../modules/ChibiOS/os/various/fatfs_bindings/fatfs_diskio.c:172:5: error: this 'if' clause does not guard... [-Werror=misleading-indentation]
172 | if (mmcIsWriteProtected(&FATFS_HAL_DEVICE))
| ^~
../../modules/ChibiOS/os/various/fatfs_bindings/fatfs_diskio.c:48:24: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the 'if'
48 | #define FATFS_RETRY(x) do { uint8_t ii; for (ii=0; ii<FATFS_NUM_RETRIES; ii++) {if ((x)==0) break; else if (ii==FATFS_NUM_RETRIES-1) return RES_ERROR;}} while(0)
| ^~
../../modules/ChibiOS/os/various/fatfs_bindings/fatfs_diskio.c:174:9: note: in expansion of macro 'FATFS_RETRY'
174 | FATFS_RETRY(mmcStartSequentialWrite(&FATFS_HAL_DEVICE, sector));
| ^~~~~~~~~~~
cc1: all warnings being treated as errors
make: *** [../../libraries/AP_HAL_ChibiOS/hwdef/common/chibios_common.mk:242: modules/ChibiOS/obj/fatfs_diskio.o] Error 1
Is there any way to disable -Werror and compile further with just compilation warnings ?