fix most warnings with -pendantic
Merge pull request #335 from abma/master

fix most warnings with -pedantic