Skip to content

Partial fix for #13330 FN knownConditionTrueFalse with comma operator - #8965

Open
chrchr-github wants to merge 5 commits into
cppcheck-opensource:mainfrom
chrchr-github:chr_13330
Open

chrchr-github wants to merge 5 commits into
cppcheck-opensource:mainfrom
chrchr-github:chr_13330

Conversation

@chrchr-github

Copy link
Copy Markdown
Collaborator

No description provided.

@dmcppcheck

Copy link
Copy Markdown

Test results for commit 2f62d59 (tools/test-my-pr.py, main compared to this PR):

Test: http://ec2-16-170-140-253.eu-north-1.compute.amazonaws.com/pr-8965/
packages: 1000
Differing warnings: 6 (+6 -0)
AI review: 2 improvement, 4 regression (http://ec2-16-170-140-253.eu-north-1.compute.amazonaws.com/pr-8965/2026-10-26_14-53-58-2f62d59bd3d5-review.txt)
Timing: -0.4% (http://ec2-16-170-140-253.eu-north-1.compute.amazonaws.com/pr-8965/2026-10-26_14-53-58-2f62d59bd3d5_timing.html)

Posted automatically by the cppcheck PR test runner. +N: warnings only with this PR, -N: warnings only with main. The AI review is written by Claude and can be wrong.

@chrchr-github

Copy link
Copy Markdown
Collaborator Author

The regressions stem from a single package, which uses this macro:

#define ERROR_EXIT(err)		  \
do				  \
{				  \
errcode = err;		  \
if (/*CONSTCOND*/(void)1,1)	  \
      	goto error_exit;	  \
}				  \
while (/*CONSTCOND*/(void)0,0)

I see no reason for that void cast/comma operator. A code search shows many instances of CONSTCOND, but I didn't find any including the cast.
https://codesearch.debian.net/search?q=CONSTCOND

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