-
What language is this for?
C++ -
Which rule?
cpp:S835 -
Why do you believe it’s a false-positive/false-negative?
I don’t really understand the relation of the rule explanation to this piece of code, to be honest.
-
Are you using
- SonarQube - which version?
Enterprise Edition - Version 9.9 (build 65466)
- SonarQube - which version?
-
How can we reproduce the problem? Give us a self-contained snippet of code (formatted text, no screenshots)
struct Test1 {
int field;
};
void test()
{
[[maybe_unused]] Test1 t1{.field{3}};
}