fix various [-Wunused-variable]