False Positives for C Rules L69 and L382


i have some false positives here.
This one is quite obvious:

There are a lot of these found, it seems the detection of signed vs. unsigned does not work:

uint16_t temp;

  • SonarQube 7.3 Enterprise Edition, SonarCFamily (cpp)
  • minimal code sample to reproduce: see above
1 Like

Hi @petermbauer,

thank you for your report. SonarCFamily is now at version 6.0, I would suggest you to try the latest version.

thx, we already planned the upgrade. Are these issues definitely fixed with 6.0 or is this just an assumption?

Hi @petermbauer,

the C/C++/Objective-C analyzer was completely rewritten improving accuracy and returning better results.

thanks for caring, i will check again with the new Version

hi @mpaladin,

i re-checked with SonarCFamily 6.1: the L382 false-positive has been fixed but the L69 is still reported.

Hi @petermbauer,

due to integer promotion >> type is signed, making ^ left operand of signed type.

1 Like

true, thank you!