Skip to content

Conversation

@Un1q32
Copy link
Contributor

@Un1q32 Un1q32 commented Jan 5, 2026

-Wextra enables some warns we don't want, so this just enables some parts we do want.
Also fixes 1 sign compare warn that was missed, and fixes a bug where a variable wasn't properly initialized.

@Un1q32 Un1q32 force-pushed the extra-compiler-warns branch from d7b95b3 to 6af9d84 Compare January 5, 2026 23:34
@Un1q32 Un1q32 force-pushed the extra-compiler-warns branch 3 times, most recently from bba38da to 032525c Compare January 7, 2026 02:49
@Un1q32 Un1q32 force-pushed the extra-compiler-warns branch from 032525c to 4c9c190 Compare January 7, 2026 02:52
@Un1q32 Un1q32 changed the title Warn for C++11 extensions Some more warns Jan 7, 2026
@Un1q32 Un1q32 changed the title Some more warns -pedantic warns Jan 7, 2026
@Un1q32 Un1q32 force-pushed the extra-compiler-warns branch 3 times, most recently from 55bc81a to 553d174 Compare January 7, 2026 03:19
@Un1q32 Un1q32 changed the title -pedantic warns More compiler warns Jan 7, 2026
@Un1q32 Un1q32 force-pushed the extra-compiler-warns branch from 553d174 to 4c9c190 Compare January 7, 2026 03:31
@Un1q32 Un1q32 force-pushed the extra-compiler-warns branch from 9a2c640 to 174fea2 Compare January 7, 2026 03:41
@Un1q32
Copy link
Contributor Author

Un1q32 commented Jan 7, 2026

note that after this pr log macro arguments are evaluated even in release builds, so be careful logging the results of expensive functions.

@BrentDaMage
Copy link
Collaborator

note that after this pr log macro arguments are evaluated even in release builds, so be careful logging the results of expensive functions.

Can you make sure this won't have any adverse effects to the current codebase?

@Un1q32
Copy link
Contributor Author

Un1q32 commented Jan 7, 2026

I ended up finding a way to not evaluate arguments on release builds, instead of LOG_*("%s", function()) expanding to mc_log("%s", function()) it expands to if (0) mc_log("%s", function())

@BrentDaMage
Copy link
Collaborator

I ended up finding a way to not evaluate arguments on release builds, instead of LOG_*("%s", function()) expanding to mc_log("%s", function()) it expands to if (0) mc_log("%s", function())

Great

Copy link
Collaborator

@BrentDaMage BrentDaMage left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

One minor thing

Copy link
Collaborator

@BrentDaMage BrentDaMage left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@Un1q32 Un1q32 force-pushed the extra-compiler-warns branch from c13efb9 to 19706ac Compare January 9, 2026 08:56
@BrentDaMage BrentDaMage merged commit abe572b into ReMinecraftPE:master Jan 10, 2026
11 checks passed
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