[tsan] Fix unused variable warnings.