Silence "set but not used" warnings.

(cherry picked from commit 73e629862f05fc5f9bc6e7034b37ddb9613c65db)