Added warning related compilation flags and fixed related errors.

Hello, thanks for your great library !
I added some compilation flags and tested this with g++ under linux.
Several issues were encountered.
The parameter placeholder is not the same as an unused variable. We are allowed to name it and not use it.