Skip to content

Conversation

pfultz2
Copy link
Contributor

@pfultz2 pfultz2 commented Sep 16, 2025

No description provided.

Copy link

@pfultz2
Copy link
Contributor Author

pfultz2 commented Sep 19, 2025

@chrchr-github @danmar @orbitcowboy Can this be merged?

@chrchr-github
Copy link
Collaborator

https://trac.cppcheck.net/ticket/13754 basically asks for the opposite of what this PR does, so we should be clear about how we handle (void) going forward,

@firewave
Copy link
Collaborator

https://trac.cppcheck.net/ticket/13754 basically asks for the opposite of what this PR does, so we should be clear about how we handle (void) going forward,

That was about local variables.

In both cases it is problematic for our "no configuration" approach because this heavily depends on coding guidelines (albeit unnamed parameters might also interfere with documentation generators).

In some cases other tools might even behave different based on the annotation used (see #7810 (comment)).

Given that we had incomplete handling of those in other places we should double-check them (not the scope of this - might take a look in a few days if nobody else does).

@pfultz2
Copy link
Contributor Author

pfultz2 commented Sep 22, 2025

We already skip warning when using the maybe_unused attribute, and when we void cast a pointer, so we should do that same for void casts for non pointer to make it consistent. Fixing the FP should be preferred over fixing a FN, we can try to work on a configuration to enable the FN in the future.

@firewave
Copy link
Collaborator

We already skip warning when using the maybe_unused attribute, and when we void cast a pointer, so we should do that same for void casts for non pointer to make it consistent.

The important thing for me is to be consistent (which we usually are not) and to stay consistent (we flip-flop sometimes).

Fixing the FP should be preferred over fixing a FN, we can try to work on a configuration to enable the FN in the future.

We should try not to add configuration.

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