Open gudnimg opened 4 years ago
Hope it is tested and working fine, approving the change
Just to make things more clear, this is what the compiler warning looks like on my end using the library before this commit. I basically copied the code in the if statement above which does the same thing but without any warnings from the compiler.
The if (reg == 2)
statement is where I am suggesting changes.
In line 665 in LTC681x.cpp this line gives a compiler warning for undefined behaviour:
parsed_stat = data[data_counter++] + (data[data_counter++]<<8);
Changing this to:
resolves the warning.