Interrupt / systemshock

Shockolate - A minimalist and cross platform System Shock source port.
GNU General Public License v3.0
803 stars 62 forks source link

No 32bit warnings #308

Closed icosahedral-dragon closed 4 years ago

icosahedral-dragon commented 4 years ago

Allows the 32-bit System Shock code to build without warnings. This isn't purely on ideological grounds (although a programmer who allows compiler warnings in his code is of course, to borrow a phrase from John Von Neumann, in a state of sin). It's an important stepping-off point for the 64-bit port, where warnings are extremely useful for pointing out incompatibilities and 32-bit assumptions.

icosahedral-dragon commented 4 years ago

It turns out that -Werror means different things in different build environments. Also Travis doesn't seem to build fluidsynth without warnings, which pretty much puts the kibosh on Werror unless we want to patch.

Now clang seems to apply -Wparentheses by default. I started looking into clobbering those warnings, and found some places where the intent of the code isn't clear, and some places where the intent of the code is clear, but isn't what the code actually does. This bears further investigation. I don't want to change any observable behaviour of the game at the moment, so I've not corrected these warnings except to add {} around some nested ifs.