DJ-TechTools / Midi_Fighter_Twister_Open_Source

95 stars 25 forks source link

Warning-free build. #15

Closed rfmerrill closed 3 months ago

rfmerrill commented 4 months ago

This PR should merge first so that the rfm/2024_update PR will be easier to read.

This eliminates all of the warnings except the explicit #warning that I figured I wouldn't touch. I was careful to do this in such a way that the output binary came out completely unchanged (hex file has same md5sum), so this should be a 100% safe set of changes to merge. To achieve this I had to do things a bit clunky in places--some of the "right" ways to get rid of the warnings ended up changing the build output, like changing global functions to static.

The changes are mostly:

Note that there are some statements with no effect that seem like mistakes, but in the interest of not changing the compile output I simply commented or conditioned them out.

This compiles without warnings on Atmel Studio 7, but as Microchip doesn't update their compiler toolchains very often I'm guessing it's probably still warning free with the latest.