Fix unused variable warnings without __attribute__

Here is another solution of __attribute__ problem without extra ``unused.hpp``.
Some C++ compiler warnings (used -Wall) are fixed by second commit.