Fix unused warnings

The warnings have been identified using gcc and configuring the
project with -DCMAKE_CXX_FLAGS:STRING=-Wall