Skip to content

fix: legit bugs found by compiler warnings#2946

Merged
bruno-dasilva merged 4 commits into
masterfrom
bruno/fix-warnings-5
Jun 2, 2026
Merged

fix: legit bugs found by compiler warnings#2946
bruno-dasilva merged 4 commits into
masterfrom
bruno/fix-warnings-5

Conversation

@bruno-dasilva

@bruno-dasilva bruno-dasilva commented Apr 22, 2026

Copy link
Copy Markdown
Collaborator

Purpose

Fix the warning spam when compiling with clang, gcc, or msvc (mostly clang). This PR focuses on the "legit" bugs found when compiling with -Wall (which has a lot of nits/false positives). Wall is only used in debug builds so I'm not worried about fixing all of them.

I went through and successfully compiled every fix, and pulled the actual warning from the compiler into a review comment. And explained the associated bug.

AI Disclosure

This PR was generated through running claude code in a loop to fix every warning. However, every non-trivial change was inspected and several "fixes" were dropped in favor of different solutions to try and keep backwards compatibility in mind. I've called out the couple places where I don't understand the fix or the implication of the fix to other reviewers.

@bruno-dasilva

bruno-dasilva commented Apr 22, 2026

Copy link
Copy Markdown
Collaborator Author

Comment thread AI/Wrappers/CUtils/SimpleLog.c
Comment thread rts/Game/InMapDrawModel.cpp
Comment thread rts/Game/UnsyncedGameCommands.cpp
Comment thread rts/Lua/LuaFonts.cpp
Comment thread rts/Lua/LuaOpenGL.cpp Outdated
Comment thread rts/Rendering/Models/3DModelPiece.hpp
Comment thread rts/Rml/SolLua/RmlSolLua.cpp
Comment thread rts/Rendering/GL/FBO.h
Comment thread rts/System/Platform/Linux/CpuTopology.cpp
Comment thread rts/System/Platform/Watchdog.cpp Outdated
Comment thread rts/Lua/LuaOpenGL.cpp
@bruno-dasilva bruno-dasilva force-pushed the bruno/fix-warnings-4 branch from 34b90ee to d2328da Compare May 27, 2026 18:37
@bruno-dasilva bruno-dasilva force-pushed the bruno/fix-warnings-5 branch from 26a1122 to d4120a6 Compare May 27, 2026 18:39
@bruno-dasilva bruno-dasilva removed the request for review from lhog May 27, 2026 18:41
@bruno-dasilva

Copy link
Copy Markdown
Collaborator Author

@sprunk this one should be good to go for a final review :)

@sprunk

sprunk commented May 28, 2026

Copy link
Copy Markdown
Collaborator

I resolved the individual comments where applicable, a handful are left

@bruno-dasilva bruno-dasilva force-pushed the bruno/fix-warnings-4 branch from 95ae94c to b0d3a81 Compare June 1, 2026 09:25
@bruno-dasilva bruno-dasilva force-pushed the bruno/fix-warnings-5 branch from d4120a6 to f20cefb Compare June 1, 2026 12:14
@bruno-dasilva bruno-dasilva changed the base branch from bruno/fix-warnings-4 to master June 1, 2026 12:17
@bruno-dasilva bruno-dasilva merged commit e18dfcf into master Jun 2, 2026
5 checks passed
@bruno-dasilva bruno-dasilva deleted the bruno/fix-warnings-5 branch June 2, 2026 14:18
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