Few compiler warnings to solve
bertmelis opened this issue · comments
Bert Melis commented
ModbusTypeDefs.h:127:10: warning: type qualifiers ignored on function return type [-Wignored-qualifiers]
static const FCType getType(uint8_t functionCode);
^~~~~
ModbusTypeDefs.h:132:10: warning: type qualifiers ignored on function return type [-Wignored-qualifiers]
static const FCType redefineType(uint8_t functionCode, const FCType type = FCUSER);
^~~~~
RTUutils.cpp:373:40: warning: 'b' may be used uninitialized in this function [-Wmaybe-uninitialized]
if ((b & 0x80) || ASCIIread[b] == 0xFF) {
~~~~~~~~~~~^
The last error is a false positive but can be easily avoided at line 240: int b;
to be replaced by int b = 0
;
Michael Harwerth commented
Will do. Not before tomorrow I am afraid - I have been shoving heavy furniture and need some rest 😁
Michael Harwerth commented
Should be okay now - trivial, I hope. I did not explicitly test it
Michael Harwerth commented
Argh. Missed to change the ModbusTypeDefs.cpp
as well.