clion-cppcheck icon indicating copy to clipboard operation
clion-cppcheck copied to clipboard

Changed warning not displayed when line wasn't changed

Open firewave opened this issue 3 years ago • 1 comments

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

image

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

image

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.

image

Note: I tested this with a standalone file (i.e. not belonging to any project).

I wonder if this might be related to #37.

firewave avatar Aug 13 '22 17:08 firewave

Possibly related to #35 and #65 as well.

firewave avatar Aug 15 '22 08:08 firewave