You are proposing to move the declarations of those variables to a wider scope. There's a design rule of thumb which says to declare variables in the narrowest possible scope.
But rules can be broken if there's a good enough reason. So it's up to you to provide a reason why you want to break that rule, not up to somebody else to provide a reason why you shouldn't. What's your reason?