Drop unused variables (#71685)
Summary:
This fixes a number of unused variable warnings that appear when compiling with LLVM-12 on platform010. Fixes are made by removing the variable when possible or by using `/* */` comments to unname the variable when a shared interface is used or eliminating the variable entirely would require extensive changes or risk modifying a public API.
Pull Request resolved: https://github.com/pytorch/pytorch/pull/71685
Test Plan: Sandcastle
Reviewed By: luciang, meyering
Differential Revision: D33728264
fbshipit-source-id: 49286ad7f5271ca1cb48dc70039097305285c948
(cherry picked from commit a2306cddd67b5f2d83d7c2829aea7cb3d1ce767e)