travis: update before installing deps
Use GNUC format attribute on print functions

Closes #1059
Fix formatting warnings

Found by #1059
Warning cleanup

- ignoring const
- declarations after statements
- some C files didnt include own headers (risking them getting out of sync)