Minor pedantic variable definition fixes

Fixes a couple pedantic issues with variables not always being defined and
passing a couple unused variables to error handling functions.
minor #1324 Minor pedantic variable definition fixes (jwatzman)

This PR was merged into the 1.15-dev branch.

Discussion
----------

Minor pedantic variable definition fixes

Fixes a couple pedantic issues with variables not always being defined and
passing a couple unused variables to error handling functions.

Commits
-------

83dd42e Minor pedantic variable definition fixes