openvehicles / Open-Vehicle-Monitoring-System-3

Open Vehicle Monitoring System - Version 3
http:///www.openvehicles.com/
Other
593 stars 225 forks source link

Vehicle_Vweup - fix a compilation issue #1035

Closed llange closed 1 month ago

llange commented 2 months ago

The compiler in ESP-IDF v5+ is very sensitive to detecting potential issue. Here, an indentation could be interpreted by the human reader as if an if block was encompassing a whole indented block.

The fix here is either to remove the indentation, or to add curly braces to explicitely delimit the block managed by the if condition.

The indentation was removed.

Note : I erred on the safe side by remove the indentation, so that it compiles the same way it does on ESP-IDF v3. However, as I'm note familiar with the code and the intention of the if condition, I'd appreciate a full review of this block of code by a more knowledgeable person than me. Thanks :-)

dexterbg commented 1 month ago

It's not my code either, but I think your interpretation & change is correct.

@sharkcow Heiko, please have a look as well -- thanks!