SmartRC-CC1101-Driver-Lib icon indicating copy to clipboard operation
SmartRC-CC1101-Driver-Lib copied to clipboard

compiler warning

Open angrest opened this issue 2 years ago • 1 comments

First of all, thanks for the excellent work!

When compiling with highest warn level, the compiler spits out the message

Arduino/libraries/SmartRC-CC1101-Driver-Lib/ELECHOUSE_CC1101_SRC_DRV.cpp:445:5: warning: 'a' may be used uninitialized in this function [-Wmaybe-uninitialized]
 int a;
     ^

And indeed, if the frequency is set to be outside the specified limits (e.g. 377.9 MHz), a will not be set in the code and thus, something weird be assigned to the PA_TABLE and subsequently written to the chip. As I am not sure how the chip will react in the first place on a frequency value outside the bands it is designed for, I do not know how relevant this problem actually is.

angrest avatar Oct 07 '22 17:10 angrest

This is fixed by https://github.com/LSatan/SmartRC-CC1101-Driver-Lib/pull/132

Noltari avatar Jan 15 '24 15:01 Noltari