Fix unused variable warnings without __attribute__

Here is another solution of __attribute__ problem without extra ``unused.hpp``.
Some C++ compiler warnings (used CPPLAGS=-Wall) are fixed by second commit, no unused parameter warnings appeared (GCC 4.8.2, Ubuntu 14.01.1).