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.