Skip to content

fix: undef DPRINTF before redefining to avoid macOS warning#358

Merged
spe-ciellt merged 1 commit intogerbv:developfrom
SourceParts:fix/dprintf-undef-macos
Mar 5, 2026
Merged

fix: undef DPRINTF before redefining to avoid macOS warning#358
spe-ciellt merged 1 commit intogerbv:developfrom
SourceParts:fix/dprintf-undef-macos

Conversation

@rampageservices
Copy link
Copy Markdown
Contributor

Summary

  • Add #undef DPRINTF before every #define DPRINTF(...) across all 17 source files
  • Fixes -Wmacro-redefined warnings on macOS where CarbonCore/Debugging.h defines DPRINTF(x) (single-arg) and gerbv redefines it as variadic DPRINTF(...)
  • Follow-up to fix: replace unsafe dprintf macro with safe DPRINTF variadic macro #320 which introduced the variadic DPRINTF macro

Test plan

  • macOS CI build should have zero -Wmacro-redefined warnings for DPRINTF
  • Linux build unaffected (CarbonCore not present)

macOS CarbonCore/Debugging.h defines DPRINTF(x) which conflicts
with gerbv's variadic DPRINTF(...). Add #undef before each
redefinition to suppress -Wmacro-redefined warnings on macOS.
@spe-ciellt spe-ciellt added security fix Solution for a potential problem or omission. labels Mar 5, 2026
@spe-ciellt spe-ciellt merged commit 3dc6625 into gerbv:develop Mar 5, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

fix Solution for a potential problem or omission. security

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants