ThingPulse / esp8266-weather-station

ESP8266 Weather Station library supporting OpenWeatherMap, Aeris and other sources
MIT License
1.06k stars 359 forks source link

Fix compilation error in MetOfficeClient.cpp #199

Closed vlastahajek closed 2 years ago

vlastahajek commented 2 years ago

Maybe fixes issue #198.

With compiler option -Werror=return-type:

C:\Users\vlast\OneDrive\Dokumenty\Arduino\libraries\esp8266-weather-station\src\MetOfficeClient.cpp: In member function 'String MetOfficeClient::getWeatherIconName(String)':
C:\Users\vlast\OneDrive\Dokumenty\Arduino\libraries\esp8266-weather-station\src\MetOfficeClient.cpp:463:1: error: control reaches end of non-void function [-Werror=return-type]
463 | }
marcelstoer commented 2 years ago

To make sure we catch similar issues before the code is released, that compiler switch should be enabled for CI builds?

vlastahajek commented 2 years ago

I would recommend this. I don't use PlatformIO. This was added automatically by Arduino, most probably by changing the setting to show all warnings. However, It looks like that it is included because I received an email with failed builds in master with the exactly the same error.

marcelstoer commented 2 years ago

It looks like that it is included because I received an email with failed builds in master with the exactly the same error.

Appears to be a new behavior as the CI build passed previously. Now it doesn't: https://github.com/ThingPulse/esp8266-weather-station/runs/3170920198 This is likely because we neither pin the PlatformIO version nor the platform & framework versions.