I am using SQ analyzing my projects, written in C and C++. Target is a Texas Instruments TMS320F2837xD. Toolchain is c2000 (TI v22.6.1.LTS).
My problem is, that SQ doesn’t seem to recognize sizes of data types like char, short, long, etc. correctly. For example, I got the following issue reported by SQ:
We are trying to implement an embedded project in plain C but avoiding usage of any standard headers like stdint.h etc., thus we have made our own data-type header files (*.h).
I think, the main issue here is, that SQ doesn’t recognize the target’s architecture (TI’s TMS320F28F37xD), e.g. the size of data primitives. But this doesn’t explain, why uint32_t == unsigned long is not being treated as 32Bit?!
The ‘false positives’, as far, as I can think about it, seem to occur, when masking and binary shifting is taking place (as it can be seen by my example code snippet above).
However, maybe I’m wrong, and had to adjust my code in order to solve these issues?!
And what rule(s) are you seeing raising false positives in this case? Since you’re not on the latest version, I’d like to see if there have been updates to the rule since 2025.4.