- build-wrapper-win-x86-64, version 6.3
- SonarQube Scanner 22.214.171.1244
I am scanning C code for an embedded device, compiled through gcc, the code is simply the following:
hystpf = 3 << 3;
The following bug is reported: “Identical sub-expressions on both sides of operator “<<””.
This is not a bug and instead improves code readability when fixed-point math implementation is involved, i.e. hystpf is a 16 bit variable and will contain the value of 3 represented in fixed-point math format 13.3