Spark Firmware Compilation - Warnings as Errors

Hello!

I’ve now just found the time to start some development with particle, and I’m trying to build the vanilla “latest” branch.

Previously, when I’ve compiled the branch a few months ago on Windows, I wouldn’t really run into any errors, presumably because various -werror flags weren’t enabled in the makefile settings.

However, I’m running Arch Linux 4.6.1-2 with all dependencies installed, and I’m encountering so many warnings as errors. For example, in firmware/services/src/debug.c line 85, there’s a misleading-indentation error when running make from the firmware/ directory level.

I resolved that issue, but when executing make PLATFORM=photon in firmware/modules, I’m encountering way more warnings as errors, such as…

MCU/STM32F2xx/SPARK_Firmware_Driver/src/system_stm32f2xx.c:394:5: error: this 'while' clause does not guard... [-Werror=misleading-indentation]
     while ((RCC->CFGR & (uint32_t)RCC_CFGR_SWS ) != RCC_CFGR_SWS_PLL); 
{
}

or the following when the indentation error above was resolved.

./src/photon/wiced/network/LwIP/WWD/FreeRTOS/cpu.h:43:0: error: "BYTE_ORDER" redefined [-Werror]
 #define BYTE_ORDER LITTLE_ENDIAN

Are these warnings safe to ignore?

1 Like