johnthagen / johnthagen/clion-cppcheck
Changed warning not displayed when line wasn't changed
- Dominant language
- Java
- Stars
- 35
- Forks
- 6
- PR merge metrics
- No merged PRs in 30d
Description
```cpp
static int bar(int t)
{
const int buf[3]= {0};
return buf[t];
}
static int f(void)
{
int t;
return bar((t=5));
}
int main(void)
{
f();
}
```
The code above will show

If you change the line with the `t` assignment to `3` it will report

Both messages should be adjusted for the index but only the one where we changed the line is.
If you add a newline at the end of the file the other message is updated as well.

Note: I tested this with a standalone file (i.e. not belonging to any project).
I wonder if this might be related to #37.
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.