Fix some warnings

Using clang and somewhat aggressive warning options triggers some new warnings.

This PR fixes some related to struct initialisation and unused arguments.