Skip to content

Fix unused variable 'COLORS' warning in optimizer.c#144373

Merged
Fidget-Spinner merged 1 commit intopython:mainfrom
aisk:fix-colors-warning
Feb 1, 2026
Merged

Fix unused variable 'COLORS' warning in optimizer.c#144373
Fidget-Spinner merged 1 commit intopython:mainfrom
aisk:fix-colors-warning

Conversation

@aisk
Copy link
Contributor

@aisk aisk commented Feb 1, 2026

Move the COLORS array to the #ifdef Py_STATS block, as it's only used by the get_background_color() function which is also used in Py_STATS block block.

This Will fix the "unused variable 'COLORS'" warning when building without stats enabled.

@Fidget-Spinner Fidget-Spinner merged commit db61f62 into python:main Feb 1, 2026
69 checks passed
@Fidget-Spinner
Copy link
Member

Thanks

@aisk aisk deleted the fix-colors-warning branch February 1, 2026 05:14
Aniketsy pushed a commit to Aniketsy/cpython that referenced this pull request Feb 3, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants