Arisotura / blargSnes

SNES emulator for the 3DS.
193 stars 33 forks source link

[veryhard] Compilation warnings fixes #31

Closed thiagokokada closed 6 years ago

thiagokokada commented 8 years ago

This branch fix lots of warnings reported by the GCC compiler. The majority of them are simple fixes, like missing imports, incorrect use of printf format specifiers, some wrong types, etc. A quick test seems to not break anything.

This commit disables strict-aliasing optimization too, since there is too many parts of the code that violates this rule. It can be enabled again (without the warnings) chaging fno-strict-aliasing to -Wno-strict-aliasing.

There is still some warnings, however the majority of them is now concentrated in source/ppu_hard.c. I did not fix them because I have no idea how. Tried to simple cast everything, however this broke PPU a lot. Another warn is in source/snes.c, that seems pretty simple (can be fixed with a cast), however I decided not to do so since I don't know if this would break something.

thiagokokada commented 8 years ago

Commits 0b81966...dc2fbcb fixes the remaining warnings (except from strict-aliasing violations). They're more invasive changes, so maybe you will not want to merge them.