Skip to content

Fix #12422 False positive: subtracting pointers in same struct#5970

Closed
chrchr-github wants to merge 1 commit into
cppcheck-opensource:mainfrom
chrchr-github:chr_Fix12422
Closed

Fix #12422 False positive: subtracting pointers in same struct#5970
chrchr-github wants to merge 1 commit into
cppcheck-opensource:mainfrom
chrchr-github:chr_Fix12422

Conversation

@chrchr-github
Copy link
Copy Markdown
Collaborator

No description provided.

@pfultz2
Copy link
Copy Markdown
Contributor

pfultz2 commented Feb 12, 2024

This seems to be a better fix as it doesnt introduce FNs.

@danmar
Copy link
Copy Markdown
Collaborator

danmar commented Feb 13, 2024

as far as I see this introduced the false negative on line 11552 in testother.cpp

I am curious if it was intentional that the lifetime value would point at the struct member? As I see it the struct member does not say what lifetime the variable has, it's the object..

@chrchr-github chrchr-github deleted the chr_Fix12422 branch July 31, 2024 12:51
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.

3 participants