Pinoccio / library-pinoccio

Arduino library for Pinoccio
Other
28 stars 24 forks source link

Make all code warning-free #63

Open matthijskooijman opened 10 years ago

matthijskooijman commented 10 years ago

Currently, our code throws tons of warnings. Eventually, we should fix these, so the compiler can actually warn use when we do something stupid.

However, by default the Arduino IDE disables warnings. These can be enabled by editing the cflags and cppflags in our platform.txt. Replace -w with -Wall.

Doing this by default now isn't a good idea - there are so many warnings that even compile errors get drowned out... Also not that the Arduino core raises a few warnings, but they intend to get that fixed I believe.

amcjen commented 10 years ago

Good call. I'm going to tag this as an enhancement.

matthijskooijman commented 10 years ago

I fixed a ton of warnings in the code just now. There are still to many left to have warnings enabled by default, but most of them are const warnings in bitlash and js0n and should be fixed in upstream (I already have a bunch of fixes for bitlash queued).

matthijskooijman commented 10 years ago

And I just submitted https://github.com/arduino/Arduino/pull/1877 to make the Arduino AVR core warning free, which is another step towards fixing this.

quartzjer commented 10 years ago

Feel free to fix any warnings in js0n, upstream rarely changes and if it does it'll be easy to patch :)