So I've been looking at some old tickets marked as false positives. All examples were run with --enable=all --inconclusive. At least five tickets no longer reproduce with the current version.
Ticket#
Repro 1.87
Repro 2.3
Comment
6081
no
no
6259
yes
yes
6342
yes
no
6477
yes
yes
can be avoided by setting ptr = 0 after delete
6552
yes
yes
wacky overloaded >>= with side effects
6572
yes
yes
6809
no
no
7013
yes
no
7334
yes
yes
7366
yes
yes
7459
yes
yes
7622
yes
yes
arguably not a FP
7739
yes
yes
7754
yes
yes
7768
yes
yes
7948
yes
yes
7954
yes
yes
7959
yes
yes
arguably not a FP
8000
yes
no
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
6809: Here is what I get on Windows 64bit, which seems correct. The original complaint was about requires 'ssize_t' but the argument type is 'ssize_t'.
Code:
voidmain(void){ssize_tn=-1;printf("%zd",n);// should be allowed, like zu for size_t, gcc accepts it but cppcheck doesn'tprintf("%ld",n);// acceptable to both cppcheck and gcc}#include<stdio.h>intmain2(void){ssize_tn=-1;size_tx=2;printf("%ld \n",n);printf("%zd \n",n);printf("%lu \n",x);printf("%zu \n",x);return0;}
So I've been looking at some old tickets marked as false positives. All examples were run with
--enable=all --inconclusive. At least five tickets no longer reproduce with the current version.6342: the "analysis failed" is not reported anymore however the debug output is not good.
7013: thanks! I closed that.
8000: thanks! I closed that
6809: hmm.. amai said he could reproduce on windows but not on linux. did you try it on windows also?
6809: Here is what I get on Windows 64bit, which seems correct. The original complaint was about
requires 'ssize_t' but the argument type is 'ssize_t'.Code:
Output:
thanks! I have closed 6809
Tickets 8215, 8805 and 8909 also don't reproduce for me with either v1.87 or v2.3.
Last edit: CHR 2021-01-16
8215: I can reproduce if file extension is .c . I have the feeling that the evaluation order is defined since c++11.
thanks! I can reproduce 8909 when file extension is .c. Not sure why that makes a difference.
Hmm, I must have overlooked the file extension on some of the code snippets.
8805 has been closed by @amai.
Tickets 8094, 8227, 8526, 8942, 8961, 9026 and 9223 reproduce with v1.87, but not with v2.3.
Edited for typo: 8904 -> 8094
Last edit: CHR 2021-01-19
thanks! I closed 9223
thanks! I closed 8961
It seems I was wrong about 8227, it still reproduces after all.
I closed 9026
9937 no longer reproduces with 2.3.
Just a reminder: 9937, 8094, 8526, and 6081 are still open.
I closed 8094
I closed 8526
6081 was closed by amai
Thanks I have closed 9937
Thanks for your efforts :-)
I just noticed that 8742 no longer reproduces with head (at least the original example, the modified one still does).