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:
Changing functions to static where possible to get rid of the missing-prototypes warnings, or else just adding a prototype above them (not the ideal way). They could probably all be changed to static but doing so sometimes changed the build output.
Commenting out or conditioning out unused variables and functions, or sometimes using the UNUSED flag on them.
Changing enums and/or switch/case to match each other (avoids the switch-enum warning).
One instance where I added a #pragma to the ASF code just because changing Atmel's code seemed like a bad idea.
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.
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:
static
where possible to get rid of themissing-prototypes
warnings, or else just adding a prototype above them (not the ideal way). They could probably all be changed tostatic
but doing so sometimes changed the build output.UNUSED
flag on them.switch-enum
warning).#pragma
to the ASF code just because changing Atmel's code seemed like a bad idea.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.