Closed rubienr closed 3 years ago
Hi @rubienr , I think the original code is OK? It creates measurementRate, sets it to zero and then loads it with the 0'th byte of payloadCfg using extractInt. Please check. Best wishes, Paul
The code is okay. Clang claims that the initialization value 0
is never used but then is overwritten in L 2316 with assignment of extractInt(0)
. The measurementRate
initialization could go from L 2313 to L 2316 as uint16_t measurementRate {extractInt(0)};
and clang would be happy again. I don't want to be picky, but I would like to compile with -Wall -Werror
:)
Hi @rubienr , OK. However I fear that life is really much too short to make every piece of code 100% clang-compatible! Especially retrospectively... Let me know if this commit fixes it. Best wishes, Paul
Vale is never used: https://github.com/sparkfun/SparkFun_Ublox_Arduino_Library/blob/97bd455b0e7a05b92bfe5a528c28cc47f2e2d289/src/SparkFun_Ublox_Arduino_Library.cpp#L2313
Suggested fix: