Fix compiler warnings in release mode about unused variables.