Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

comparison is always true due to limited range of data type #66

Open
rahulOCR opened this issue Jul 4, 2021 · 0 comments
Open

comparison is always true due to limited range of data type #66

rahulOCR opened this issue Jul 4, 2021 · 0 comments

Comments

@rahulOCR
Copy link

rahulOCR commented Jul 4, 2021

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant