Skip to content

gtk.cfg: Remove extra semicolons from g_return* macros#8632

Merged
danmar merged 1 commit into
cppcheck-opensource:mainfrom
correctmost:fix-g-return-defines
Jun 17, 2026
Merged

gtk.cfg: Remove extra semicolons from g_return* macros#8632
danmar merged 1 commit into
cppcheck-opensource:mainfrom
correctmost:fix-g-return-defines

Conversation

@correctmost

Copy link
Copy Markdown
Contributor

The extra semicolons caused unknownMacro errors when checking code like this:

if (hadj)
  g_return_if_fail (GTK_IS_ADJUSTMENT (hadj));
else
  hadj = GTK_ADJUSTMENT (...)

They were introduced in commit c0b5309, but they are not actually present in the upstream GLib macros.

The extra semicolons caused unknownMacro errors when checking
code like this:

if (hadj)
  g_return_if_fail (GTK_IS_ADJUSTMENT (hadj));
else
  hadj = GTK_ADJUSTMENT (...)

They were introduced in commit c0b5309, but they are not actually
present in the upstream GLib macros.
@correctmost correctmost force-pushed the fix-g-return-defines branch from 1e8ab8e to 14e71f7 Compare June 7, 2026 00:37
@correctmost

Copy link
Copy Markdown
Contributor Author

I added // cppcheck-suppress valueFlowBailout comments to fix the previous failures.

@danmar danmar merged commit fec0f8d into cppcheck-opensource:main Jun 17, 2026
70 checks passed
@correctmost correctmost deleted the fix-g-return-defines branch June 17, 2026 06:46
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