Fix unused and uninitialized variables

Reviewed-by: Marius Vollmer <marius.vollmer@redhat.com>