There seems to be another issue with false "Using obect to temporary" (using cppcheck 2.1 gui
When only pushing one item to the vector, everything is fine, however adding additional items (uncoment comments in code below) , a "Using obect to temporary" error is issued, which I belive is not correct.
hmm I fail to reproduce this one even with cppcheck-2.1. I get no warning. not sure what I could do wrongly. Do you see the warning with such command line: cppcheck --enable=style --inconclusive test.cpp ? or is something additional needed?
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
There seems to be another issue with false "Using obect to temporary" (using cppcheck 2.1 gui
When only pushing one item to the vector, everything is fine, however adding additional items (uncoment comments in code below) , a "Using obect to temporary" error is issued, which I belive is not correct.
Last edit: Fredrik Bondesson 2020-09-07
hmm I fail to reproduce this one even with cppcheck-2.1. I get no warning. not sure what I could do wrongly. Do you see the warning with such command line:
cppcheck --enable=style --inconclusive test.cpp
? or is something additional needed?I used cppcheck ui, and analyze file.
I can try it out again but meanwhile, just to be sure, you did uncomment the commented lines?
Regards Fredrik
thanks! now I can reproduce.
I have created ticket https://trac.cppcheck.net/ticket/9880