Skip to content

Fix #11604 Debug: DacaWrongData - #8752

Merged
chrchr-github merged 2 commits into
cppcheck-opensource:mainfrom
chrchr-github:chr_11604
Aug 28, 2026
Merged

Fix #11604 Debug: DacaWrongData#8752
chrchr-github merged 2 commits into
cppcheck-opensource:mainfrom
chrchr-github:chr_11604

Conversation

@chrchr-github

Copy link
Copy Markdown
Collaborator

No description provided.

@chrchr-github
chrchr-github marked this pull request as draft July 23, 2026 19:54
@chrchr-github
chrchr-github marked this pull request as ready for review August 11, 2026 12:37
Comment thread lib/check.h
@danmar

danmar commented Aug 22, 2026

Copy link
Copy Markdown
Collaborator

According to 11604 there is a debug warning for this code:

struct S {
    S() {
        t = 0;
    }
    decltype(NULL) t;
};

so if t does not get a valuetype here, it indicates that there is room for improvement in cppcheck symboldatabase and then the debug warning seems good to me? A fix to set the valuetype would be preferable?

@chrchr-github

Copy link
Copy Markdown
Collaborator Author

According to 11604 there is a debug warning for this code:

struct S {
    S() {
        t = 0;
    }
    decltype(NULL) t;
};

so if t does not get a valuetype here, it indicates that there is room for improvement in cppcheck symboldatabase and then the debug warning seems good to me? A fix to set the valuetype would be preferable?

NULL was just an example, it could be any unknown type. Not setting a ValueType when the underlying type is unknown doesn't justify a debug warning IMHO.

@chrchr-github

Copy link
Copy Markdown
Collaborator Author

Side note: Trac is acting up again...

@danmar danmar left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

alright

@chrchr-github
chrchr-github merged commit 0ff234b into cppcheck-opensource:main Aug 28, 2026
70 of 71 checks passed
@chrchr-github
chrchr-github deleted the chr_11604 branch August 28, 2026 16:50
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