From 1aed62139cd5dc2de728f95430d66abb211a134f Mon Sep 17 00:00:00 2001 From: Un1q32 Date: Mon, 22 Dec 2025 11:41:23 -0800 Subject: [PATCH 01/37] fix conversion 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__ | ^~~~~~~~~~~ :78:21: note: expanded from macro '__INT_MAX__' 78 | #define __INT_MAX__ 2147483647 | ^~~~~~~~~~ --- source/world/entity/SynchedEntityData.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/source/world/entity/SynchedEntityData.cpp b/source/world/entity/SynchedEntityData.cpp index cec5ba8d9..ac75c3dd6 100644 --- a/source/world/entity/SynchedEntityData.cpp +++ b/source/world/entity/SynchedEntityData.cpp @@ -20,7 +20,7 @@ MAP(Vec3, TYPE_VEC3, Vec3()) SynchedEntityData::SynchedEntityData() { m_itemsArray = ItemsArray(); - m_minIdxDirty = INT_MAX; + m_minIdxDirty = UINT16_MAX; m_maxIdxDirty = 0; } @@ -72,7 +72,7 @@ void SynchedEntityData::clear() m_itemsArray.clear(); // Mark as clean - m_minIdxDirty = INT_MAX; + m_minIdxDirty = UINT16_MAX; m_maxIdxDirty = 0; } @@ -91,7 +91,7 @@ SynchedEntityData::ItemsArray SynchedEntityData::packDirty() } // Mark as clean - m_minIdxDirty = INT_MAX; + m_minIdxDirty = UINT16_MAX; return result; } @@ -274,4 +274,4 @@ SynchedEntityData::ItemsArray SynchedEntityData::Unpack(IDataInput& dis) } return result; -} \ No newline at end of file +} From 48b2b74cf4c45b9a0d8863ed9d876d6308bba8fe Mon Sep 17 00:00:00 2001 From: Un1q32 Date: Mon, 22 Dec 2025 12:23:16 -0800 Subject: [PATCH 02/37] add parentesis 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)) | ^ | == --- source/server/ServerSideNetworkHandler.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/server/ServerSideNetworkHandler.cpp b/source/server/ServerSideNetworkHandler.cpp index 2e1ec0775..c732d30c5 100644 --- a/source/server/ServerSideNetworkHandler.cpp +++ b/source/server/ServerSideNetworkHandler.cpp @@ -99,7 +99,7 @@ void ServerSideNetworkHandler::onDisconnect(const RakNet::RakNetGUID& guid) // remove it from our world m_pLevel->removeEntity(pPlayer); } - else if (pPlayer = getPendingPlayerByGUID(guid)) + else if ((pPlayer = getPendingPlayerByGUID(guid))) { // Player was still loading m_pendingPlayers.erase(guid); From 1eb6b3d18092f052f9e7d12fcfed419408e35818 Mon Sep 17 00:00:00 2001 From: Un1q32 Date: Mon, 22 Dec 2025 12:28:30 -0800 Subject: [PATCH 03/37] explicitly handle STATUS_SUCCESS in switch ClientSideNetworkHandler.cpp:100:10: warning: enumeration value 'STATUS_SUCCESS' not handled in switch [-Wswitch] 100 | switch (pPacket->m_loginStatus) | ^~~~~~~~~~~~~~~~~~~~~~ --- source/client/network/ClientSideNetworkHandler.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/source/client/network/ClientSideNetworkHandler.cpp b/source/client/network/ClientSideNetworkHandler.cpp index e74d348d1..f975ffdd8 100644 --- a/source/client/network/ClientSideNetworkHandler.cpp +++ b/source/client/network/ClientSideNetworkHandler.cpp @@ -105,6 +105,8 @@ void ClientSideNetworkHandler::handle(const RakNet::RakNetGUID& rakGuid, LoginSt case LoginStatusPacket::STATUS_SERVER_OUTDATED: m_pMinecraft->setScreen(new DisconnectionScreen("Could not connect: Outdated server!")); break; + case LoginStatusPacket::STATUS_SUCCESS: + break; } } @@ -840,4 +842,4 @@ void ClientSideNetworkHandler::flushAllBufferedUpdates() void ClientSideNetworkHandler::handleBlockUpdate(const BlockUpdate& u) { m_pLevel->setTileAndData(u.pos, Tile::TransformToValidBlockId(u.tile), u.data); -} \ No newline at end of file +} From 6177e59d5372b77aaa035d9bc23665d96f6a34a1 Mon Sep 17 00:00:00 2001 From: Un1q32 Date: Mon, 22 Dec 2025 12:31:18 -0800 Subject: [PATCH 04/37] explicitly handle all cases in switch TntTile.cpp:25:10: warning: 4 enumeration values not handled in switch: 'NORTH', 'SOUTH', 'WEST'... [-Wswitch] 25 | switch (face) | ^~~~ --- source/world/tile/TntTile.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/source/world/tile/TntTile.cpp b/source/world/tile/TntTile.cpp index 0955bd748..db244e552 100644 --- a/source/world/tile/TntTile.cpp +++ b/source/world/tile/TntTile.cpp @@ -28,9 +28,9 @@ int TntTile::getTexture(Facing::Name face) const return m_TextureFrame + 2; case Facing::UP: return m_TextureFrame + 1; + default: + return m_TextureFrame; } - - return m_TextureFrame; } void TntTile::destroy(Level* level, const TilePos& pos, TileData data) From 38deafd8c18fa1852bc0b91d3baf161486b858ee Mon Sep 17 00:00:00 2001 From: Un1q32 Date: Mon, 22 Dec 2025 12:32:19 -0800 Subject: [PATCH 05/37] explictly handle all cases in switch SandStoneTile.cpp:18:10: warning: 4 enumeration values not handled in switch: 'NORTH', 'SOUTH', 'WEST'... [-Wswitch] 18 | switch (face) | ^~~~ --- source/world/tile/SandStoneTile.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/source/world/tile/SandStoneTile.cpp b/source/world/tile/SandStoneTile.cpp index b387a2c98..df16028a8 100644 --- a/source/world/tile/SandStoneTile.cpp +++ b/source/world/tile/SandStoneTile.cpp @@ -21,7 +21,7 @@ int SandStoneTile::getTexture(Facing::Name face) const return TEXTURE_SANDSTONE_BOTTOM; case Facing::UP: return TEXTURE_SANDSTONE_TOP; + default: + return m_TextureFrame; } - - return m_TextureFrame; } From e3a52bac325c51c28db0a87bfe25b71d313ff712 Mon Sep 17 00:00:00 2001 From: Un1q32 Date: Mon, 22 Dec 2025 12:34:15 -0800 Subject: [PATCH 06/37] explicitly handle all cases in grass tile switch --- source/world/tile/GrassTile.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/source/world/tile/GrassTile.cpp b/source/world/tile/GrassTile.cpp index 0c4c550b4..3fe05e8e4 100644 --- a/source/world/tile/GrassTile.cpp +++ b/source/world/tile/GrassTile.cpp @@ -53,6 +53,8 @@ int GrassTile::getTexture(const LevelSource* level, const TilePos& pos, Facing:: return TEXTURE_GRASS_TOP; case Facing::DOWN: return TEXTURE_DIRT; + default: + break; } Material* pMat = level->getMaterial(pos.above()); From 303230f94c7ab40287672f85ff61c2a2b3b64d7f Mon Sep 17 00:00:00 2001 From: Un1q32 Date: Mon, 22 Dec 2025 12:36:37 -0800 Subject: [PATCH 07/37] explicitly handle all cases --- source/client/app/Minecraft.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/source/client/app/Minecraft.cpp b/source/client/app/Minecraft.cpp index d85d5f309..c071245a4 100644 --- a/source/client/app/Minecraft.cpp +++ b/source/client/app/Minecraft.cpp @@ -467,6 +467,8 @@ void Minecraft::handleBuildAction(const BuildActionIntention& action) } break; } + default: + break; } if (bInteract && action.isInteract() && canInteract) From 04c5e36c8a13cb1d1a8550b3aabde8e52272d1e0 Mon Sep 17 00:00:00 2001 From: Un1q32 Date: Mon, 22 Dec 2025 13:03:07 -0800 Subject: [PATCH 08/37] cast NSInteger before NSLog 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( ) --- platforms/ios/minecraftpeViewController.mm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/platforms/ios/minecraftpeViewController.mm b/platforms/ios/minecraftpeViewController.mm index 8ee4150af..ac84a189c 100644 --- a/platforms/ios/minecraftpeViewController.mm +++ b/platforms/ios/minecraftpeViewController.mm @@ -297,7 +297,7 @@ - (void)setAnimationFrameInterval:(NSInteger)frameInterval if (frameInterval >= 1) { animationFrameInterval = frameInterval; - NSLog(@"Set animationFrameInterval to %d\n", animationFrameInterval); + NSLog(@"Set animationFrameInterval to %ld\n", static_cast(animationFrameInterval)); if (animating) { From 52004e6eb51ff38d6a640e57a21c954f520c3da6 Mon Sep 17 00:00:00 2001 From: Un1q32 Date: Mon, 22 Dec 2025 13:07:35 -0800 Subject: [PATCH 09/37] explicitly handle all cases --- source/client/renderer/entity/EntityRenderDispatcher.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/source/client/renderer/entity/EntityRenderDispatcher.cpp b/source/client/renderer/entity/EntityRenderDispatcher.cpp index a57b2a849..acbbb00b5 100644 --- a/source/client/renderer/entity/EntityRenderDispatcher.cpp +++ b/source/client/renderer/entity/EntityRenderDispatcher.cpp @@ -126,9 +126,9 @@ EntityRenderer* EntityRenderDispatcher::getRenderer(Entity::RenderType renderTyp case Entity::RENDER_FALLING_TILE: return &m_FallingTileRenderer; #endif + default: + return nullptr; } - - return nullptr; } EntityRenderer* EntityRenderDispatcher::getRenderer(const Entity& entity) From 931429054c60c58ed4017da2c2c15b3a142ec82a Mon Sep 17 00:00:00 2001 From: Un1q32 Date: Mon, 22 Dec 2025 14:53:24 -0800 Subject: [PATCH 10/37] use FLT_{MIN,MAX} instead of INT_{MIN,MAX} --- source/world/phys/Vec2.cpp | 4 ++-- source/world/phys/Vec3.cpp | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/source/world/phys/Vec2.cpp b/source/world/phys/Vec2.cpp index a0df85b38..c9ee5a762 100644 --- a/source/world/phys/Vec2.cpp +++ b/source/world/phys/Vec2.cpp @@ -6,14 +6,14 @@ SPDX-License-Identifier: BSD-1-Clause ********************************************************************/ -#include +#include #include "Vec2.hpp" const Vec2 Vec2::ZERO = Vec2(0, 0), Vec2::ONE = Vec2(1, 1); const Vec2 Vec2::UNIT_X = Vec2(1, 0), Vec2::NEG_UNIT_X = Vec2(-1, 0); const Vec2 Vec2::UNIT_Y = Vec2(0, 1), Vec2::NEG_UNIT_Y = Vec2(0, -1); -const Vec2 Vec2::MIN = Vec2(INT_MIN, INT_MIN), Vec2::MAX = Vec2(INT_MAX, INT_MAX); +const Vec2 Vec2::MIN = Vec2(FLT_MIN, FLT_MIN), Vec2::MAX = Vec2(FLT_MAX, FLT_MAX); void Vec2::_init(float x, float y) { diff --git a/source/world/phys/Vec3.cpp b/source/world/phys/Vec3.cpp index 50e1426bf..77d64ebd1 100644 --- a/source/world/phys/Vec3.cpp +++ b/source/world/phys/Vec3.cpp @@ -6,7 +6,7 @@ SPDX-License-Identifier: BSD-1-Clause ********************************************************************/ -#include +#include #include "Vec3.hpp" #include "world/level/TilePos.hpp" @@ -15,7 +15,7 @@ const Vec3 Vec3::ZERO = Vec3(0, 0, 0), Vec3::ONE = Vec3(1, 1, 1); const Vec3 Vec3::UNIT_X = Vec3(1, 0, 0), Vec3::NEG_UNIT_X = Vec3(-1, 0, 0); const Vec3 Vec3::UNIT_Y = Vec3(0, 1, 0), Vec3::NEG_UNIT_Y = Vec3(0, -1, 0); const Vec3 Vec3::UNIT_Z = Vec3(0, 0, 1), Vec3::NEG_UNIT_Z = Vec3(0, 0, -1); -const Vec3 Vec3::MIN = Vec3(INT_MIN, INT_MIN, INT_MIN), Vec3::MAX = Vec3(INT_MAX, INT_MAX, INT_MAX); +const Vec3 Vec3::MIN = Vec3(FLT_MIN, FLT_MIN, FLT_MIN), Vec3::MAX = Vec3(FLT_MAX, FLT_MAX, FLT_MAX); void Vec3::_init(float x, float y, float z) { From 17b8c6eadbc9665d445edf61a1837c55e8d01173 Mon Sep 17 00:00:00 2001 From: Un1q32 Date: Mon, 22 Dec 2025 15:08:29 -0800 Subject: [PATCH 11/37] cast to correct type --- source/renderer/hal/ogl/RenderContextOGL.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/source/renderer/hal/ogl/RenderContextOGL.cpp b/source/renderer/hal/ogl/RenderContextOGL.cpp index 12da29728..f5832d35e 100644 --- a/source/renderer/hal/ogl/RenderContextOGL.cpp +++ b/source/renderer/hal/ogl/RenderContextOGL.cpp @@ -215,7 +215,7 @@ void RenderContextOGL::drawIndexed(PrimitiveMode primitiveMode, unsigned int cou void RenderContextOGL::drawIndexed(PrimitiveMode primitiveMode, unsigned int count, unsigned int startOffset, uint8_t indexSize) { - glDrawElements(modeMap[primitiveMode], count, indexType[indexSize], (const GLvoid*)(startOffset * indexSize)); + glDrawElements(modeMap[primitiveMode], count, indexType[indexSize], (const GLvoid*)((uintptr_t)startOffset * indexSize)); } void RenderContextOGL::setDepthRange(float nearVal, float farVal) @@ -336,4 +336,4 @@ GLenum mce::getComparisonFunc(ComparisonFunc comparisonFunc) LOG_E("Unknown comparisonFunc: %d", comparisonFunc); throw std::bad_cast(); } -} \ No newline at end of file +} From 53f0198cc58c599e33be4ced088ada3153fdf0e6 Mon Sep 17 00:00:00 2001 From: Un1q32 Date: Mon, 22 Dec 2025 15:25:17 -0800 Subject: [PATCH 12/37] set type of m_pData to short * --- source/client/sound/SoundData.cpp | 4 ++-- source/client/sound/SoundData.hpp | 2 +- source/client/sound/SoundStream.cpp | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/source/client/sound/SoundData.cpp b/source/client/sound/SoundData.cpp index 991391d66..2e8d0ee87 100644 --- a/source/client/sound/SoundData.cpp +++ b/source/client/sound/SoundData.cpp @@ -54,7 +54,7 @@ bool SoundDesc::_loadPcm(const AppPlatform* platform, const char *name) m_codecType = AudioCodec::PCM; m_fileData = m_file.data; m_header = *(PCMSoundHeader *) m_fileData; - m_buffer.m_pData = (void *) (m_fileData + sizeof(PCMSoundHeader)); + m_buffer.m_pData = (short *) (m_fileData + sizeof(PCMSoundHeader)); m_buffer.m_dataSize = m_header.m_channels * m_header.m_length * m_header.m_bytes_per_sample; // Success! @@ -125,4 +125,4 @@ void SoundDesc::_unloadAll() // Declare Variables #define SOUND(category, name, number) SoundDesc SA_##name##number; #include "sound_list.h" -#undef SOUND \ No newline at end of file +#undef SOUND diff --git a/source/client/sound/SoundData.hpp b/source/client/sound/SoundData.hpp index b2bc5cd49..f9b528181 100644 --- a/source/client/sound/SoundData.hpp +++ b/source/client/sound/SoundData.hpp @@ -35,7 +35,7 @@ struct PCMSoundHeader struct SoundBuffer { - void* m_pData; + short *m_pData; int m_dataSize; }; diff --git a/source/client/sound/SoundStream.cpp b/source/client/sound/SoundStream.cpp index 7b1456263..80649591a 100644 --- a/source/client/sound/SoundStream.cpp +++ b/source/client/sound/SoundStream.cpp @@ -12,7 +12,7 @@ SoundStream::SoundStream() m_totalSamplesLeft = 0; m_tempPcmBuffer.m_dataSize = 4096 * 8; - m_tempPcmBuffer.m_pData = new int16_t[m_tempPcmBuffer.m_dataSize]; + m_tempPcmBuffer.m_pData = new short[m_tempPcmBuffer.m_dataSize]; } SoundStream::~SoundStream() From daf109a54aab96ae05f22b9fb4f437ab8e6685da Mon Sep 17 00:00:00 2001 From: Un1q32 Date: Mon, 22 Dec 2025 16:51:57 -0800 Subject: [PATCH 13/37] change m_pData type from short to int16_t everywhere --- source/client/sound/SoundData.cpp | 6 ++---- source/client/sound/SoundData.hpp | 2 +- source/client/sound/SoundStream.cpp | 4 ++-- 3 files changed, 5 insertions(+), 7 deletions(-) diff --git a/source/client/sound/SoundData.cpp b/source/client/sound/SoundData.cpp index 2e8d0ee87..2171a2237 100644 --- a/source/client/sound/SoundData.cpp +++ b/source/client/sound/SoundData.cpp @@ -54,7 +54,7 @@ bool SoundDesc::_loadPcm(const AppPlatform* platform, const char *name) m_codecType = AudioCodec::PCM; m_fileData = m_file.data; m_header = *(PCMSoundHeader *) m_fileData; - m_buffer.m_pData = (short *) (m_fileData + sizeof(PCMSoundHeader)); + m_buffer.m_pData = (int16_t *) (m_fileData + sizeof(PCMSoundHeader)); m_buffer.m_dataSize = m_header.m_channels * m_header.m_length * m_header.m_bytes_per_sample; // Success! @@ -76,9 +76,7 @@ bool SoundDesc::_loadOgg(const AppPlatform* platform, const char* category, cons m_codecType = AudioCodec::OGG; m_fileData = m_file.data; m_header.m_bytes_per_sample = 2; // Always 2 (16-bit) - // Casting to a short** here might cause problems. Let's find out... - // Seems like it doesn't. Cool. - m_header.m_length = stb_vorbis_decode_memory(m_file.data, (int) m_file.size, &m_header.m_channels, &m_header.m_sample_rate, (short **) &m_buffer.m_pData); + m_header.m_length = stb_vorbis_decode_memory(m_file.data, (int) m_file.size, &m_header.m_channels, &m_header.m_sample_rate, (int16_t **) &m_buffer.m_pData); if (m_header.m_length == -1) { LOG_E("An error occurred while trying to decode a sound!"); diff --git a/source/client/sound/SoundData.hpp b/source/client/sound/SoundData.hpp index f9b528181..e2b458aa4 100644 --- a/source/client/sound/SoundData.hpp +++ b/source/client/sound/SoundData.hpp @@ -35,7 +35,7 @@ struct PCMSoundHeader struct SoundBuffer { - short *m_pData; + int16_t *m_pData; int m_dataSize; }; diff --git a/source/client/sound/SoundStream.cpp b/source/client/sound/SoundStream.cpp index 80649591a..af011ec44 100644 --- a/source/client/sound/SoundStream.cpp +++ b/source/client/sound/SoundStream.cpp @@ -12,7 +12,7 @@ SoundStream::SoundStream() m_totalSamplesLeft = 0; m_tempPcmBuffer.m_dataSize = 4096 * 8; - m_tempPcmBuffer.m_pData = new short[m_tempPcmBuffer.m_dataSize]; + m_tempPcmBuffer.m_pData = new int16_t[m_tempPcmBuffer.m_dataSize]; } SoundStream::~SoundStream() @@ -36,7 +36,7 @@ bool SoundStream::_stream(int bufferId) while (size < m_tempPcmBuffer.m_dataSize) { - result = stb_vorbis_get_samples_short_interleaved(m_decoder, m_info.channels, (short*)m_tempPcmBuffer.m_pData + size, m_tempPcmBuffer.m_dataSize - size); + result = stb_vorbis_get_samples_short_interleaved(m_decoder, m_info.channels, (int16_t *)m_tempPcmBuffer.m_pData + size, m_tempPcmBuffer.m_dataSize - size); if (result > 0) size += result * m_info.channels; else break; } From fbb8d341ac9cf8c250b8a2cfff8f63f5b978286a Mon Sep 17 00:00:00 2001 From: Un1q32 Date: Mon, 22 Dec 2025 19:55:15 -0800 Subject: [PATCH 14/37] fix buffer allocation --- source/nbt/Tag.hpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/source/nbt/Tag.hpp b/source/nbt/Tag.hpp index dea1ce99c..43da5b45c 100644 --- a/source/nbt/Tag.hpp +++ b/source/nbt/Tag.hpp @@ -59,7 +59,7 @@ class TagMemoryChunk m_size = size; if (size > 0) { - m_buffer = new uint8_t(size); + m_buffer = new uint8_t[size]; if (m_buffer) memset(m_buffer, 0, size); } @@ -83,4 +83,4 @@ class TagMemoryChunk unsigned int m_elements; unsigned int m_size; uint8_t* m_buffer; -}; \ No newline at end of file +}; From 1c72e27d0d2f1f854b401a6bb668a7d79a4f33b2 Mon Sep 17 00:00:00 2001 From: Un1q32 Date: Mon, 22 Dec 2025 20:13:20 -0800 Subject: [PATCH 15/37] remove pointless arg --- CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index ff4992991..ab65ba707 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -28,7 +28,7 @@ check_symbol_exists("_WIN32" "" MCPE_WIN32) # Clang if(CMAKE_CXX_COMPILER_ID STREQUAL "Clang") - add_compile_options(-Wno-inconsistent-missing-override -Wno-enum-compare-switch -Wno-register) + add_compile_options(-Wno-inconsistent-missing-override -Wno-register) endif() # Windows Linking From 168e4aa67b338d131a6f966dae45848e33b102da Mon Sep 17 00:00:00 2001 From: Un1q32 Date: Mon, 22 Dec 2025 20:13:38 -0800 Subject: [PATCH 16/37] fix register warn --- CMakeLists.txt | 2 +- thirdparty/raknet/Rand.cpp | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index ab65ba707..373b04f13 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -28,7 +28,7 @@ check_symbol_exists("_WIN32" "" MCPE_WIN32) # Clang if(CMAKE_CXX_COMPILER_ID STREQUAL "Clang") - add_compile_options(-Wno-inconsistent-missing-override -Wno-register) + add_compile_options(-Wno-inconsistent-missing-override) endif() # Windows Linking diff --git a/thirdparty/raknet/Rand.cpp b/thirdparty/raknet/Rand.cpp index 0d9db67c1..869afbc8f 100644 --- a/thirdparty/raknet/Rand.cpp +++ b/thirdparty/raknet/Rand.cpp @@ -142,8 +142,8 @@ void seedMT( unsigned int seed, unsigned int *state, unsigned int *&next, int &l // so-- that's why the only change I made is to restrict to odd seeds. // - register unsigned int x = ( seed | 1U ) & 0xFFFFFFFFU, *s = state; - register int j; + unsigned int x = ( seed | 1U ) & 0xFFFFFFFFU, *s = state; + int j; for ( left = 0, *s++ = x, j = N; --j; *s++ = ( x *= 69069U ) & 0xFFFFFFFFU ) From bb2a0f99a14ca56492966e49f495dae607a324d7 Mon Sep 17 00:00:00 2001 From: Un1q32 Date: Mon, 22 Dec 2025 20:26:30 -0800 Subject: [PATCH 17/37] disable warns for stb_vorbis its a submodule so theres nothing we can do to actually fix the issue --- CMakeLists.txt | 2 ++ 1 file changed, 2 insertions(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index 373b04f13..d15b5b19b 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -80,3 +80,5 @@ endif() if(USE_GL_VBO_EMULATION) add_compile_options(-DUSE_GL_VBO_EMULATION) endif() + +target_compile_options(stb_vorbis PUBLIC -w) From a13a1cbdcd9b194c786f0b501808388323020bf4 Mon Sep 17 00:00:00 2001 From: Un1q32 Date: Mon, 22 Dec 2025 20:28:03 -0800 Subject: [PATCH 18/37] always true warn --- thirdparty/raknet/DynDNS.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/thirdparty/raknet/DynDNS.cpp b/thirdparty/raknet/DynDNS.cpp index 23ccd8eb1..8780fbbe9 100644 --- a/thirdparty/raknet/DynDNS.cpp +++ b/thirdparty/raknet/DynDNS.cpp @@ -219,7 +219,7 @@ void DynDNS::Update(void) existingHost[0]=0; // Resolve DNS we are setting. If equal to current then abort RakNetSocket2::DomainNameToIP(host.C_String(), existingHost); - if (existingHost && strcmp(existingHost, myIPStr)==0) + if (strcmp(existingHost, myIPStr)==0) { // DynDNS considers setting the IP to what it is already set abuse tcp->DeallocatePacket(packet); From 6d3b791d2ac4a242f46965639342de3b1e9a0fc9 Mon Sep 17 00:00:00 2001 From: Un1q32 Date: Mon, 22 Dec 2025 21:15:58 -0800 Subject: [PATCH 19/37] fix --- CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index d15b5b19b..34e5687d6 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -81,4 +81,4 @@ if(USE_GL_VBO_EMULATION) add_compile_options(-DUSE_GL_VBO_EMULATION) endif() -target_compile_options(stb_vorbis PUBLIC -w) +target_compile_options(stb_vorbis PRIVATE -w) From a8106e42212027a93ee8ad7e8b352df9cb48be82 Mon Sep 17 00:00:00 2001 From: Un1q32 Date: Mon, 22 Dec 2025 21:17:50 -0800 Subject: [PATCH 20/37] nobody gaf :sob: --- platforms/ios/CMakeLists.txt | 2 ++ 1 file changed, 2 insertions(+) diff --git a/platforms/ios/CMakeLists.txt b/platforms/ios/CMakeLists.txt index a3917d7ac..cb4544d9f 100644 --- a/platforms/ios/CMakeLists.txt +++ b/platforms/ios/CMakeLists.txt @@ -4,6 +4,8 @@ project(reminecraftpe-ios) target_compile_definitions(reminecraftpe-core PUBLIC HANDLE_CHARS_SEPARATELY USE_GLES) target_compile_definitions(stb_image PUBLIC STBI_NO_THREAD_LOCALS) +add_compile_options(-Wno-deprecated-declarations) + # Build add_executable(reminecraftpe AppPlatform_iOS.mm From f7b5d24eec967921eb770945f7af4f04de979822 Mon Sep 17 00:00:00 2001 From: Un1q32 Date: Mon, 22 Dec 2025 21:53:31 -0800 Subject: [PATCH 21/37] remove useless define this is defined in the root cmakelists so no point in defining it here --- platforms/ios/CMakeLists.txt | 1 - 1 file changed, 1 deletion(-) diff --git a/platforms/ios/CMakeLists.txt b/platforms/ios/CMakeLists.txt index cb4544d9f..1d02c320d 100644 --- a/platforms/ios/CMakeLists.txt +++ b/platforms/ios/CMakeLists.txt @@ -2,7 +2,6 @@ cmake_minimum_required(VERSION 3.16.0) project(reminecraftpe-ios) target_compile_definitions(reminecraftpe-core PUBLIC HANDLE_CHARS_SEPARATELY USE_GLES) -target_compile_definitions(stb_image PUBLIC STBI_NO_THREAD_LOCALS) add_compile_options(-Wno-deprecated-declarations) From 6b2cf35505a8e9b1064ca795ac1a9069b0438953 Mon Sep 17 00:00:00 2001 From: Un1q32 Date: Mon, 22 Dec 2025 21:55:34 -0800 Subject: [PATCH 22/37] gcc gives a warn in stb_image --- CMakeLists.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index 34e5687d6..69d658ae3 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -82,3 +82,4 @@ if(USE_GL_VBO_EMULATION) endif() target_compile_options(stb_vorbis PRIVATE -w) +target_compile_options(stb_image PRIVATE -w) From 67e0f54b83ff3e7104c56dc8d6a5e782834baa89 Mon Sep 17 00:00:00 2001 From: Un1q32 Date: Tue, 23 Dec 2025 00:32:08 -0800 Subject: [PATCH 23/37] use the dedicated option for adding compiler definitions instead of manually passing -D --- CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 69d658ae3..2383fcc00 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -53,7 +53,7 @@ else() endif() # Disable thread local storage (needed for C++98 & iOS) -add_compile_options(-DRAPIDJSON_NO_THREAD_LOCAL -DSTBI_NO_THREAD_LOCALS) +add_compile_definitions(RAPIDJSON_NO_THREAD_LOCAL STBI_NO_THREAD_LOCALS) # Android Logging if(ANDROID) From 4133b43533502803808808addd9ba334940997d9 Mon Sep 17 00:00:00 2001 From: Un1q32 Date: Tue, 23 Dec 2025 00:43:41 -0800 Subject: [PATCH 24/37] more cmake nits --- CMakeLists.txt | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 2383fcc00..498b22000 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -76,10 +76,11 @@ else() file(CREATE_LINK "${CMAKE_CURRENT_SOURCE_DIR}/game/assets" "${CMAKE_CURRENT_BINARY_DIR}/assets" SYMBOLIC) endif() -#VBO Emulation +# VBO Emulation if(USE_GL_VBO_EMULATION) - add_compile_options(-DUSE_GL_VBO_EMULATION) + add_compile_definitions(USE_GL_VBO_EMULATION) endif() +# Disable warnings on third party libraries target_compile_options(stb_vorbis PRIVATE -w) target_compile_options(stb_image PRIVATE -w) From f46381219a50a3ba53aa264c383c31236894a80b Mon Sep 17 00:00:00 2001 From: Un1q32 Date: Sun, 28 Dec 2025 01:02:22 -0800 Subject: [PATCH 25/37] dont cast --- source/client/sound/SoundData.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/client/sound/SoundData.cpp b/source/client/sound/SoundData.cpp index 2171a2237..12efebe2f 100644 --- a/source/client/sound/SoundData.cpp +++ b/source/client/sound/SoundData.cpp @@ -76,7 +76,7 @@ bool SoundDesc::_loadOgg(const AppPlatform* platform, const char* category, cons m_codecType = AudioCodec::OGG; m_fileData = m_file.data; m_header.m_bytes_per_sample = 2; // Always 2 (16-bit) - m_header.m_length = stb_vorbis_decode_memory(m_file.data, (int) m_file.size, &m_header.m_channels, &m_header.m_sample_rate, (int16_t **) &m_buffer.m_pData); + m_header.m_length = stb_vorbis_decode_memory(m_file.data, (int) m_file.size, &m_header.m_channels, &m_header.m_sample_rate, &m_buffer.m_pData); if (m_header.m_length == -1) { LOG_E("An error occurred while trying to decode a sound!"); From ebccc5beb85cdffce50decda31e7c879f03edd70 Mon Sep 17 00:00:00 2001 From: Un1q32 Date: Wed, 31 Dec 2025 16:58:18 -0500 Subject: [PATCH 26/37] can i silence the warn by litterally just increasing the size --- thirdparty/raknet/PacketLogger.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/thirdparty/raknet/PacketLogger.cpp b/thirdparty/raknet/PacketLogger.cpp index 9738e7ed6..1fc0a8a8f 100644 --- a/thirdparty/raknet/PacketLogger.cpp +++ b/thirdparty/raknet/PacketLogger.cpp @@ -152,7 +152,7 @@ void PacketLogger::OnReliabilityLayerNotification(const char *errorMessage, cons } void PacketLogger::OnAck(unsigned int messageNumber, SystemAddress remoteSystemAddress, RakNet::TimeMS time) { - char str[256]; + char str[512]; char str1[64], str2[62]; SystemAddress localSystemAddress = rakPeerInterface->GetExternalID(remoteSystemAddress); localSystemAddress.ToString(true, str1); From d94f977ac7d7dc56a971c12f12e8908c944f33fe Mon Sep 17 00:00:00 2001 From: Un1q32 Date: Wed, 31 Dec 2025 16:59:56 -0500 Subject: [PATCH 27/37] increase size again --- thirdparty/raknet/PacketLogger.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/thirdparty/raknet/PacketLogger.cpp b/thirdparty/raknet/PacketLogger.cpp index 1fc0a8a8f..4631b0cbb 100644 --- a/thirdparty/raknet/PacketLogger.cpp +++ b/thirdparty/raknet/PacketLogger.cpp @@ -171,7 +171,7 @@ void PacketLogger::OnAck(unsigned int messageNumber, SystemAddress remoteSystemA } void PacketLogger::OnPushBackPacket(const char *data, const BitSize_t bitsUsed, SystemAddress remoteSystemAddress) { - char str[256]; + char str[512]; char str1[64], str2[62]; SystemAddress localSystemAddress = rakPeerInterface->GetExternalID(remoteSystemAddress); localSystemAddress.ToString(true, str1); From a983ccffeadc6ba46d8859a17a213aebc29849a7 Mon Sep 17 00:00:00 2001 From: Un1q32 Date: Wed, 31 Dec 2025 17:24:28 -0500 Subject: [PATCH 28/37] dont assign float to int --- source/client/gui/screens/OptionsScreen.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/client/gui/screens/OptionsScreen.cpp b/source/client/gui/screens/OptionsScreen.cpp index d29a01983..a7cb7c09f 100644 --- a/source/client/gui/screens/OptionsScreen.cpp +++ b/source/client/gui/screens/OptionsScreen.cpp @@ -58,7 +58,7 @@ void OptionsScreen::init() tabButtons[i]->m_width = buttonWidth; tabButtons[i]->m_height = buttonHeight; tabButtons[i]->m_xPos = startX + (buttonWidth + buttonSpacing) * i; - tabButtons[i]->m_yPos = 4.3; + tabButtons[i]->m_yPos = 4; } for (int i = 0; i < NUM_CATEGORY_BUTTONS; ++i) From b68115d6b7da08caede58eb0eb88d395458750f8 Mon Sep 17 00:00:00 2001 From: Un1q32 Date: Wed, 31 Dec 2025 17:44:31 -0500 Subject: [PATCH 29/37] format args --- source/client/renderer/renderer/RenderMaterialGroup.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/source/client/renderer/renderer/RenderMaterialGroup.cpp b/source/client/renderer/renderer/RenderMaterialGroup.cpp index efe5cd26e..cb5f0b8f9 100644 --- a/source/client/renderer/renderer/RenderMaterialGroup.cpp +++ b/source/client/renderer/renderer/RenderMaterialGroup.cpp @@ -139,7 +139,7 @@ void RenderMaterialGroup::_loadList() rapidjson::ParseResult ok = doc.Parse(fileContents.c_str()); if (!ok) { - LOG_E("Error parsing \"%s\", offset %u: %s", path.c_str(), ok.Offset(), rapidjson::GetParseError_En(ok.Code())); + LOG_E("Error parsing \"%s\", offset %zu: %s", path.c_str(), ok.Offset(), rapidjson::GetParseError_En(ok.Code())); continue; } @@ -241,4 +241,4 @@ void RenderMaterialGroup::onAppSuspended() { it->second = RenderMaterial(); } -} \ No newline at end of file +} From 6f7b334e5c23dca6e27a993f33c2c42c80ea2ff9 Mon Sep 17 00:00:00 2001 From: Un1q32 Date: Wed, 31 Dec 2025 21:00:07 -0500 Subject: [PATCH 30/37] remove unused function --- platforms/android/AppPlatform_android.cpp | 20 +------------------- platforms/android/AppPlatform_android.hpp | 1 - 2 files changed, 1 insertion(+), 20 deletions(-) diff --git a/platforms/android/AppPlatform_android.cpp b/platforms/android/AppPlatform_android.cpp index f2e965dbb..03c9eaee0 100644 --- a/platforms/android/AppPlatform_android.cpp +++ b/platforms/android/AppPlatform_android.cpp @@ -102,24 +102,6 @@ int AppPlatform_android::getUserInputStatus() return m_UserInputStatus; } -void AppPlatform_android::createUserInput() -{ - m_UserInput.clear(); - m_UserInputStatus = -1; - - switch (m_DialogType) - { - case DLG_CREATE_WORLD: - { - // some placeholder for now - m_UserInput.push_back("New World"); - m_UserInput.push_back("123456"); - m_UserInputStatus = 1; - break; - } - } -} - void AppPlatform_android::showDialog(eDialogType type) { m_DialogType = type; @@ -297,4 +279,4 @@ AssetFile AppPlatform_android::readAssetFile(const std::string& str, bool quiet) AAsset_read(asset, (void*)buffer, cnt); AAsset_close(asset); return AssetFile(ssize_t(cnt), buffer); -} \ No newline at end of file +} diff --git a/platforms/android/AppPlatform_android.hpp b/platforms/android/AppPlatform_android.hpp index c9515eabd..4d58dd137 100644 --- a/platforms/android/AppPlatform_android.hpp +++ b/platforms/android/AppPlatform_android.hpp @@ -23,7 +23,6 @@ class AppPlatform_android : public AppPlatform void buyGame() override; void saveScreenshot(const std::string& fileName, int width, int height) override; int checkLicense() override; - void createUserInput() override; std::vector getUserInput() override; int getUserInputStatus() override; int getScreenWidth() const override; From 2d82476f422bcec3b7168180ad965837a153d050 Mon Sep 17 00:00:00 2001 From: Un1q32 Date: Thu, 1 Jan 2026 02:08:09 -0500 Subject: [PATCH 31/37] build vendored SDL2 with C++11 --- platforms/sdl/sdl2/CMakeLists.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/platforms/sdl/sdl2/CMakeLists.txt b/platforms/sdl/sdl2/CMakeLists.txt index 456831043..ed2dad0b7 100644 --- a/platforms/sdl/sdl2/CMakeLists.txt +++ b/platforms/sdl/sdl2/CMakeLists.txt @@ -36,6 +36,7 @@ add_library(SDL INTERFACE) if(ANDROID OR MCPE_WIN32) # Use Vendored SDL2 (Only For Android) add_subdirectory(../../../thirdparty/SDL2/src SDL EXCLUDE_FROM_ALL) + set_target_properties(SDL2::SDL2 PROPERTIES CXX_STANDARD 11) target_link_libraries(SDL INTERFACE SDL2::SDL2) elseif(EMSCRIPTEN) # Use Emscripten's SDL2 From d34a702baa83147cfde374c1ae6453a0c09a4144 Mon Sep 17 00:00:00 2001 From: Un1q32 Date: Thu, 1 Jan 2026 02:24:35 -0500 Subject: [PATCH 32/37] allow building for macOS with modern GCC --- source/renderer/hal/ogl/API_OGL.cpp | 1 + thirdparty/raknet/HTTPConnection2.cpp | 2 ++ thirdparty/raknet/Rackspace.cpp | 2 ++ thirdparty/raknet/RakNetSocket2.h | 2 +- 4 files changed, 6 insertions(+), 1 deletion(-) diff --git a/source/renderer/hal/ogl/API_OGL.cpp b/source/renderer/hal/ogl/API_OGL.cpp index 91e6448c7..d129827f4 100644 --- a/source/renderer/hal/ogl/API_OGL.cpp +++ b/source/renderer/hal/ogl/API_OGL.cpp @@ -1,3 +1,4 @@ +#include #include #include "API_OGL.hpp" diff --git a/thirdparty/raknet/HTTPConnection2.cpp b/thirdparty/raknet/HTTPConnection2.cpp index 95325dbb2..d629cb2b4 100644 --- a/thirdparty/raknet/HTTPConnection2.cpp +++ b/thirdparty/raknet/HTTPConnection2.cpp @@ -8,6 +8,8 @@ * */ +#include + #include "NativeFeatureIncludes.h" #if _RAKNET_SUPPORT_HTTPConnection2==1 && _RAKNET_SUPPORT_TCPInterface==1 diff --git a/thirdparty/raknet/Rackspace.cpp b/thirdparty/raknet/Rackspace.cpp index b2d68aa7e..16c3907ca 100644 --- a/thirdparty/raknet/Rackspace.cpp +++ b/thirdparty/raknet/Rackspace.cpp @@ -8,6 +8,8 @@ * */ +#include + #include "NativeFeatureIncludes.h" #if _RAKNET_SUPPORT_Rackspace==1 && _RAKNET_SUPPORT_TCPInterface==1 diff --git a/thirdparty/raknet/RakNetSocket2.h b/thirdparty/raknet/RakNetSocket2.h index 91ea1ad4e..817068db7 100644 --- a/thirdparty/raknet/RakNetSocket2.h +++ b/thirdparty/raknet/RakNetSocket2.h @@ -22,7 +22,7 @@ // https://developer.apple.com/library/mac/#documentation/CoreFOundation/Reference/CFSocketRef/Reference/reference.html // Reason: http://sourceforge.net/p/open-dis/discussion/683284/thread/0929d6a0 #if defined(__APPLE__) -#import +#include #include #include #endif From a0b9f0850aabc95255a7215013c2079e86e26a3d Mon Sep 17 00:00:00 2001 From: Un1q32 Date: Thu, 1 Jan 2026 02:28:09 -0500 Subject: [PATCH 33/37] disable deprecated declarations warns on macOS too --- CMakeLists.txt | 3 +++ platforms/ios/CMakeLists.txt | 2 -- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 498b22000..ad713a674 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -30,6 +30,9 @@ check_symbol_exists("_WIN32" "" MCPE_WIN32) if(CMAKE_CXX_COMPILER_ID STREQUAL "Clang") add_compile_options(-Wno-inconsistent-missing-override) endif() +if(APPLE) + add_compile_options(-Wno-deprecated-declarations) +endif() # Windows Linking if(MCPE_WIN32) diff --git a/platforms/ios/CMakeLists.txt b/platforms/ios/CMakeLists.txt index 1d02c320d..b0dc5a142 100644 --- a/platforms/ios/CMakeLists.txt +++ b/platforms/ios/CMakeLists.txt @@ -3,8 +3,6 @@ project(reminecraftpe-ios) target_compile_definitions(reminecraftpe-core PUBLIC HANDLE_CHARS_SEPARATELY USE_GLES) -add_compile_options(-Wno-deprecated-declarations) - # Build add_executable(reminecraftpe AppPlatform_iOS.mm From 388a567202c17e4317e81917b4febced97ce0ce2 Mon Sep 17 00:00:00 2001 From: Un1q32 Date: Thu, 1 Jan 2026 02:28:45 -0500 Subject: [PATCH 34/37] fix --- platforms/sdl/sdl2/CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/platforms/sdl/sdl2/CMakeLists.txt b/platforms/sdl/sdl2/CMakeLists.txt index ed2dad0b7..ddeac92f5 100644 --- a/platforms/sdl/sdl2/CMakeLists.txt +++ b/platforms/sdl/sdl2/CMakeLists.txt @@ -36,7 +36,7 @@ add_library(SDL INTERFACE) if(ANDROID OR MCPE_WIN32) # Use Vendored SDL2 (Only For Android) add_subdirectory(../../../thirdparty/SDL2/src SDL EXCLUDE_FROM_ALL) - set_target_properties(SDL2::SDL2 PROPERTIES CXX_STANDARD 11) + set_target_properties(SDL2 PROPERTIES CXX_STANDARD 11) target_link_libraries(SDL INTERFACE SDL2::SDL2) elseif(EMSCRIPTEN) # Use Emscripten's SDL2 From d219d135c6432d2fb521d503a1882286009c154e Mon Sep 17 00:00:00 2001 From: Un1q32 Date: Thu, 1 Jan 2026 02:29:47 -0500 Subject: [PATCH 35/37] disable compiler C++ extensions and see if anything breaks --- CMakeLists.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index ad713a674..e21836d38 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -10,6 +10,7 @@ set(CMAKE_CXX_STANDARD 11) else() set(CMAKE_CXX_STANDARD 98) endif() +set(CXX_EXTENSIONS OFF) # WASM if(EMSCRIPTEN) From df1cf1c84348a76a5fb206d2f5a2b79ccff56383 Mon Sep 17 00:00:00 2001 From: Un1q32 Date: Fri, 2 Jan 2026 15:21:19 -0500 Subject: [PATCH 36/37] handle case i think this is actually handling upside-down torches --- source/world/tile/TorchTile.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/source/world/tile/TorchTile.cpp b/source/world/tile/TorchTile.cpp index 9338b1cf7..c423097e9 100644 --- a/source/world/tile/TorchTile.cpp +++ b/source/world/tile/TorchTile.cpp @@ -181,6 +181,8 @@ void TorchTile::setPlacedOnFace(Level* level, const TilePos& pos, Facing::Name f if (level->isSolidTile(pos.west())) data = 1; break; + case Facing::DOWN: + break; } level->setData(pos, data); From c4505d728c4cc8b3479609eda44edd56e55d72c1 Mon Sep 17 00:00:00 2001 From: Un1q32 Date: Fri, 2 Jan 2026 15:25:26 -0500 Subject: [PATCH 37/37] enable -Werror for everything except android --- .github/workflows/build.yml | 5 +++-- CMakeLists.txt | 5 +++++ build-wasm.sh | 2 +- platforms/ios/build.sh | 1 + 4 files changed, 10 insertions(+), 3 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 4ae81caf2..5b72bc354 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -36,7 +36,7 @@ jobs: run: | mkdir build cd build - cmake -GNinja ${{ matrix.flags }} .. + cmake -GNinja -DWERROR=ON ${{ matrix.flags }} .. cmake --build . wasm: name: WASM @@ -112,6 +112,7 @@ jobs: RANLIB: llvm-ranlib-21 LLVM_CONFIG: llvm-config-21 REMCPE_NO_IPA: 1 + WERROR: ON android: strategy: fail-fast: false @@ -168,5 +169,5 @@ jobs: run: | mkdir build cd build - cmake -GNinja -DCMAKE_TOOLCHAIN_FILE=../cmake/mingw-w64-toolchain.cmake ${{ matrix.flags }} .. + cmake -GNinja -DWERROR=ON -DCMAKE_TOOLCHAIN_FILE=../cmake/mingw-w64-toolchain.cmake ${{ matrix.flags }} .. cmake --build . diff --git a/CMakeLists.txt b/CMakeLists.txt index e21836d38..760657cd6 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -12,6 +12,11 @@ set(CMAKE_CXX_STANDARD 98) endif() set(CXX_EXTENSIONS OFF) +# Warnings +if(WERROR) + add_compile_options(-Werror) +endif() + # WASM if(EMSCRIPTEN) function(add_compile_and_link_options) diff --git a/build-wasm.sh b/build-wasm.sh index 638906693..ab4c2b703 100755 --- a/build-wasm.sh +++ b/build-wasm.sh @@ -31,7 +31,7 @@ mkdir -p build cd build # Configure Build -emcmake cmake -GNinja "$@" ../../ +emcmake cmake -GNinja -DWERROR=ON "$@" ../../ # Build cmake --build . diff --git a/platforms/ios/build.sh b/platforms/ios/build.sh index 74ab47cc0..3f21d3ebb 100755 --- a/platforms/ios/build.sh +++ b/platforms/ios/build.sh @@ -145,6 +145,7 @@ for target in $targets; do -DCMAKE_C_COMPILER="$target-cc" \ -DCMAKE_CXX_COMPILER="$target-c++" \ -DCMAKE_FIND_ROOT_PATH="$sdk/usr" \ + -DWERROR="${WERROR:-OFF}" \ $lto make -j"$ncpus" mv "$bin" "$workdir/$bin-$target"