FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

Fix #11604 Debug: DacaWrongData by chrchr-github · Pull Request #8752 · cppcheck-opensource/cppcheck · GitHub

Fix #11604 Debug: DacaWrongData - #8752

Open
chrchr-github wants to merge 2 commits into
cppcheck-opensource:mainfrom
chrchr-github:chr_11604
Open

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

Conversation

Copy link
Copy Markdown
Collaborator

No description provided.

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

/** Use WRONG_DATA in checkers to mark conditions that check that data is correct */
#define WRONG_DATA(COND, TOK) ((COND) && wrongData((TOK), #COND))

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

does this mean that wrongData is never used and can be removed also?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

It is getting removed, see below.

danmar commented Aug 22, 2026

Copy link
Copy Markdown
Contributor

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?

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.

Copy link
Copy Markdown
Collaborator Author

Side note: Trac is acting up again...

This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
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


Back | FazBrowse Home | New Git URL