- ALM used : GitHub
- CI system used : Github actions
- Languages of the repository: C
- Only if the SonarCloud project is public, the URL: https://sonarcloud.io/project/overview?id=balaji-nordic_sdk-nrf
I get a bug report from sonarcloud stating that the memcmp operation should not be used when comparing two structs as the struct has padding. Here is the link to the bug report → https://sonarcloud.io/project/issues?resolved=false&rules=c%3AS5000&severities=BLOCKER&types=BUG&id=balaji-nordic_sdk-nrf&open=AYTON6R0KjB6nK53VS7b
The structure in question is bt_addr_le_t
defined here .
AFAIK, the struct does not have padding. I verified that by printing the size of the struct. Should I just mark it as false positive? Or am I missing something?