I simply assumed the compiler warnings meant that the variables were not used at all.
Looks like this is an incorrect assumption.
The compilers appear to more intelligent than I expected and can detect that even though the variables are modified later on, they still are not used.
This is good news.
The bad news is that means I have bad code resulting from an incomplete clean up that need to be fixed.
This bad code is now fixed.