comparison is always true due to limited range of data type
- Dominant language
- C
- Stars
- 343
- Forks
- 245
- PR merge metrics
- No merged PRs in 30d
Description
In SiK/Firmware/Radio/parameter.c ,
```
// Place the start away from the other params to allow for expantion 2<<7 +128 = 384
#ifdef INCLUDE_AES
// Holds the encrpytion string
__xdata uint8_t encryption_key[32];
#define PARAM_E_FLASH_START (2<<7) + 128
#define PARAM_E_FLASH_END (PARAM_E_FLASH_START + sizeof(encryption_key) + 3)
// Check to make sure the End of the pins and the beginning of encryption dont overlap
typedef char p2eCheck[(PIN_FLASH_END < PARAM_E_FLASH_START) ? 0 : -1];
```
In the check comparison is always True due to limited range of data type is coming. I have tried to fix it but unable because of compiler. Anybody that successfully compiled this please let me know the compiler version and any other fix for this issue.
Contributor guide
No contributing guide indexed for this repository
Research direction
Start in SiK/Firmware/Radio/parameter.c by inspecting the types and definitions of PIN_FLASH_END, PARAM_E_FLASH_START, and the surrounding compiler diagnostics. Reproduce the comparison warning with the project’s supported compiler and build process. Done means the overlap check remains meaningful, the warning is resolved, and the firmware compiles successfully.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- c
- Domain
- embedded-iot
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100