fix unused-but-set-variable warnings