Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix #12379 FN: uninitvar due to line splicing #7312

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

clock999
Copy link

https://trac.cppcheck.net/ticket/12379

No warning is given, because Cppcheck does not remove the next line after // some comment\ properly:

#include
#include
#include

void f()
{
std::size_t i;
const std::vectorstd::string v{"4", "2"};
// Some comment
for(i = 0U; i < v.size(); ++i)
{
std::cout << v[i];
}
}

@chrchr-github
Copy link
Collaborator

chrchr-github commented Feb 20, 2025

Since this is a change in simplecpp, please open a PR at the upstream project https://github.com/danmar/simplecpp
See danmar/simplecpp#337
Also, a test is needed there.

@clock999
Copy link
Author

Hi CHR, I will submit PR to project simpleapp. What do you mean by "Also, a test is needed there"? Do you mean that I need to code test cases and submit them together with the fix code? Many thanks!

@clock999
Copy link
Author

Hi, I am not sure if there is a problem with the unit tests on the simpleapp project. I posted the details here: https://sourceforge.net/p/cppcheck/discussion/general/thread/37c6eba151/
Could you please help take a look? Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants