When built with -Wall the idiom `({ … })` leads to a "value computed is
not used" warning. That notation produces a compound statement that
acts as an expression with the value being the value of the last
statement inside. For the switch statement it is not even clear what
this value would be and it is never used anywhere (hence the warning).
For the CP_ macros it would be one byte out of four right? Makes no
sense either.
You would have to assign that value to something, but then you would use
a real function with a return type, because that is easier to understand
anyways.
So why not use the usual way to create a void function like
preprocessor macro in C/C++ by using a do-while-loop with a false
condition. Warning disappears.
Link: https://gcc.gnu.org/onlinedocs/cpp/Swallowing-the-Semicolon.html
Fixes: 0347a3df44 ("* PR #76 updated debug messages: now 5 different levels are available * fixed CRC loop issue")
* fixed typos in changelog #1172
* fixed MqTT manual clientId storage #1174
* fixed inverter name length in setup #1181
* added inverter name to the header of alarm list #1181
* improved code to avoid warning during compilation #1182
* fix scheduler #1188, #1179
The actual change here was done with 821ab96402 ("hm: Re-add Hardware
Number 10104000 for HM-400") and again without mention in commit message
with afa96506a3 ("MI - alarms and control and other"). The changelog
was updated with the merge commit cfd73906e4 ("Merge branch
'development03' of https://github.com/rejoe2/ahoy into
rejoe2-development03") but attributing the wrong model.
* add another HM-600 hardware serial number #1169
* merge PR #1170
* reduce last_success MQTT messages (#1124)
* add re-request if inverter is known to be online and first try fails
* add alarm reporting to MI (might need review!)
* rebuild MI limiting code closer to DTUSimMI example
* round APC in `W` to an integer #1171
* reduce last_success MQTT messages (#1124)
* add re-request if inverter is known to be online and first try fails
* add alarm reporting to MI (might need review!)
* rebuild MI limiting code closer to DTUSimMI example
This was probably removed by accident? Resulted in no Max. Power shown
for this device in live view.
References: #1111
Fixes: 201098ae0b ("0.7.45 * change ePaper text to symbols PR #1131 * added some invertes to dev info list #1111")
Signed-off-by: Alexander Dahl <post@lespocky.de>
* fix prometheus builds
* fix ESP32 default pinout #1159
* added `opendtufusion-dev` because of anoying `-DARDUINO_USB_CDC_ON_BOOT=1` flag
* fix display of current power on `index`
* fix OTA, was damaged by version `0.7.51`, need to use webinstaller (from `0.7.51` to `0.7.54`)
* added active power control in `W` to live view #201, #673
* updated docu, active power control related #706
* added current AC-Power to `index` page and removed version #763
* improved statistic data, moved to entire struct
* removed `/api/statistics` endpoint from REST-API
* moved MqTT info to `system`
* added CMT info for ESP32 devices
* improved CMT settings, now `SCLK` and `SDIO` are configurable #1046, #1150
* changed `Power-Limit` in live-view to `Active Power Control`
* increase length of update file selector #1132
* add option to strip webUI for ESP8266 (reduce code size, add ESP32 special features; `IF_ESP32` directives)
* started to get CMT info into `system` - not finished