[style] Code style fixups in GetWarnings()
Summary:
Rename a variable.
This is a partial backport of Core PR17750 [3/3]
https://github.com/bitcoin/bitcoin/pull/17750/commits/7aab8d1024996c7c422bd34a8226df0117b813f7
Depends on D8330
Test Plan: ninja
Reviewers: #bitcoin_abc, majcosta
Reviewed By: #bitcoin_abc, majcosta
Differential Revision: https://reviews.bitcoinabc.org/D8331