Skip to content

removed TokenList::getSettings() and replaced usage in ValueFlow with provided settings#4843

Merged
danmar merged 3 commits intocppcheck-opensource:mainfrom
firewave:toklist-cfg
Mar 3, 2023
Merged

removed TokenList::getSettings() and replaced usage in ValueFlow with provided settings#4843
danmar merged 3 commits intocppcheck-opensource:mainfrom
firewave:toklist-cfg

Conversation

@firewave
Copy link
Copy Markdown
Collaborator

@firewave firewave commented Mar 2, 2023

It was only used in valueflow.cpp where we already have the Settings available so just use those instead. It might have returned nullptr (although not in the context where the ValueFlow is called) and was immediately dereferenced unchecked.

It is unlikely (as there only is one Settings object) but it might have also led to two different settings being used within the ValueFlow.

@danmar danmar merged commit 8023eff into cppcheck-opensource:main Mar 3, 2023
@firewave firewave deleted the toklist-cfg branch March 3, 2023 18:19
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