fix -Wunused-variable warning in Release mode