OpenAnnePro / qmk_firmware

This has since been merged back to mainline QMK. Please use qmk/qmk_firmware
https://qmk.fm
GNU General Public License v2.0
196 stars 64 forks source link

[Bug] Should "warnings being treated as errors" be disabled to make annepro2/c18? #52

Closed Galicarnax closed 2 years ago

Galicarnax commented 2 years ago

So I'm stuck at the stage when I need to make annepro2/c18. Namely, this is what I get:

Compiling: lib/chibios-contrib/os/hal/ports/HT32/HT32F523x2/hal_lld.c                              lib/chibios-contrib/os/hal/ports/HT32/HT32F523x2/hal_lld.c: In function 'ht32_clock_init':
lib/chibios-contrib/os/hal/ports/HT32/HT32F523x2/hal_lld.c:56:5: error: this 'while' clause does not guard... [-Werror=misleading-indentation]
   56 |     while (PWRCU->BAKTEST != 0x27);
      |     ^~~~~
In file included from ./lib/chibios-contrib/os/common/startup/ARMCMx/devices/HT32F523x2/cmparams.h:74,
                 from ./lib/chibios/os/common/ports/ARMCMx/chcore.h:70,
                 from ./lib/chibios/os/rt/include/ch.h:110,
                 from ./lib/chibios/os/hal/osal/rt/osal.h:32,
                 from ./lib/chibios/os/hal/include/hal.h:28,
                 from lib/chibios-contrib/os/hal/ports/HT32/HT32F523x2/hal_lld.c:26:
./lib/chibios-contrib/os/common/ext/CMSIS/HT32F523x2/ht32f523x2.h:184:33: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the 'while'
  184 | #define CKCU                    ((CKCU_TypeDef *)   CKCU_BASE)
      |                                 ^
lib/chibios-contrib/os/hal/ports/HT32/HT32F523x2/hal_lld.c:67:9: note: in expansion of macro 'CKCU'
   67 |         CKCU->GCFGR &= ~CKCU_GCFGR_PLLSRC; // HSE as PLL source
      |         ^~~~
cc1: all warnings being treated as errors
 [ERRORS]
 | 
 | 
 | 
make[1]: *** [tmk_core/rules.mk:412: .build/obj_annepro2_c18/lib/chibios-contrib/os/hal/ports/HT32/HT32F523x2/hal_lld.o] Error 1
Make finished with errors
make: *** [Makefile:523: annepro2/c18:default] Error 1

As far as I understand, this might be (theoretically) solved by finding the -Werror flags and removing them. But then, it seems that this is a rare, if not unique, issue when compiling the annepro-qmk following the instructions, as I didn't find any mentions of it. What could be wrong here?

P.S. I'm in Arch Linux.

Codetector1374 commented 2 years ago

Looks mostly like formatting error. We can probably fix that. I might look into it later

firatakandere commented 2 years ago

Yeah I had this issue on my ArchLinux as well, but it passed fine when I tried with WSL Ubuntu. Didn't have time to check what was the difference.

alsatierf commented 2 years ago

I was hitting the same issue but simply setting export ALLOW_WARNINGS=yes make clean && make annepro2/c18:default did the trick

Codetector1374 commented 2 years ago

This has since got merged into the main QMK repo. So this is a bit under-maintained to say the least

Codetector1374 commented 2 years ago

Feel free to just use the main qmk repo