Jason_SV.Apres|Hunter336|WI - I am trying to mi...
I am trying to migrate the code here: https://github.com/Techstyleuk/sensesp-engine_monitor to Ver3 and I get this warning:
In file included from src/main.cpp:14:
.pio/libdeps/pioarduino_esp32/SensESP/src/sensesp/sensors/analog_input.h:44:7: warning: attribute ignored in declaration of 'class sensesp::AnalogInput' [-Wattributes]
44 | class AnalogInput : public FloatSensor {
| ^~~
.pio/libdeps/pioarduino_esp32/SensESP/src/sensesp/sensors/analog_input.h:44:7: note: attribute for 'class sensesp::AnalogInput' must follow the 'class' keyword
In file included from src/main.cpp:15:
.pio/libdeps/pioarduino_esp32/SensESP/src/sensesp/sensors/digital_input.h: In lambda function:
.pio/libdeps/pioarduino_esp32/SensESP/src/sensesp/sensors/digital_input.h:98:59: warning: '++' expression of 'volatile'-qualified type is deprecated [-Wvolatile]
98 | configpath, this { this->counter++; }) {
| ~~^~~~
should I just ignore it?
2 Replies
Yeah they are just warnings. Authors need to clean these up though because the attribute after class declaration has no effect and is ignored. Also Incrementing a volatile variable like that is not guaranteed to be atomic or safe
Seems like digital_input.h and analog_input.h have this issue, is that how you see it?