Fix unused variable warnings from debug-only code.