-
Notifications
You must be signed in to change notification settings - Fork 73
Fix compiler warns #239
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
Un1q32
wants to merge
25
commits into
ReMinecraftPE:master
Choose a base branch
from
Un1q32:compiler-wanrs
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Fix compiler warns #239
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1126ad1 to
994ba3f
Compare
BrentDaMage
requested changes
Dec 23, 2025
SynchedEntityData.cpp:23:21: warning: implicit conversion from 'int' to
'DataID' (aka 'unsigned short') changes value from 2147483647 to 65535
[-Wconstant-conversion]
23 | m_minIdxDirty = INT_MAX;
| ~ ^~~~~~~
/usr/lib/clang/21/include/limits.h:50:19: note: expanded from macro
'INT_MAX'
50 | #define INT_MAX __INT_MAX__
| ^~~~~~~~~~~
<built-in>:78:21: note: expanded from macro '__INT_MAX__'
78 | #define __INT_MAX__ 2147483647
| ^~~~~~~~~~
ServerSideNetworkHandler.cpp:102:19: warning: using the result of an
assignment as a condition without parentheses [-Wparentheses]
102 | else if (pPlayer = getPendingPlayerByGUID(guid))
| ~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/uniq/devel/mcpe/source/server/ServerSideNetworkHandler.cpp:102:19:
note: place parentheses around the assignment to silence this warning
102 | else if (pPlayer = getPendingPlayerByGUID(guid))
| ^
| ( )
/home/uniq/devel/mcpe/source/server/ServerSideNetworkHandler.cpp:102:19:
note: use '==' to turn this assignment into an equality comparison
102 | else if (pPlayer = getPendingPlayerByGUID(guid))
| ^
| ==
ClientSideNetworkHandler.cpp:100:10: warning: enumeration value
'STATUS_SUCCESS' not handled in switch [-Wswitch]
100 | switch (pPacket->m_loginStatus)
| ^~~~~~~~~~~~~~~~~~~~~~
TntTile.cpp:25:10: warning: 4 enumeration values not handled in switch:
'NORTH', 'SOUTH', 'WEST'... [-Wswitch]
25 | switch (face)
| ^~~~
SandStoneTile.cpp:18:10: warning: 4 enumeration values not handled in
switch: 'NORTH', 'SOUTH', 'WEST'... [-Wswitch]
18 | switch (face)
| ^~~~
minecraftpeViewController.mm:300:54: warning: values of type 'NSInteger'
should not be used as format arguments; add an explicit cast to 'long'
instead [-Wformat]
300 | NSLog(@"Set animationFrameInterval to %d\n",
animationFrameInterval);
| ~~
^~~~~~~~~~~~~~~~~~~~~~
| %ld
static_cast<long>( )
737548e to
daf109a
Compare
its a submodule so theres nothing we can do to actually fix the issue
847ac9a to
bb2a0f9
Compare
this is defined in the root cmakelists so no point in defining it here
…anually passing -D
BrentDaMage
requested changes
Dec 28, 2025
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
m_minIdxDirty is uint16_t and cannot hold
INT_MAX, compiler truncates it toUINT16_MAX, changed it to useUINT16_MAXexplicitly.Added parenthesis to silence assignment warn.
Explicitly handled all enum cases in switch statements in a bunch of places.
Cast NSInteger to long before using in a printf-like function, also updated the format to expect long instead of int.
Used FLT_{MIN,MAX} macros instead of INT_{MIN,MAX} for maximum float value.
Disabled depricated-declarations warns for iOS.
Disabled all warns for stb_vorbis, nothing we can do about those cuz its a submodule.
Fixed incorrect heap allocation syntax.
Every warn that is not fixed by this PR (for the iOS build at least):
This looks like an actual bug, since the underside of torches are invisible ingame, I don't wanna silence the warn without fixing the bug, which is beyond the scope of this PR.