Terminal: initialize some variables

This is harmless, the sequence of states ensures they would be
initialized when needed anyway, but Coverity decides otherwise.

Fixes #10131 / CID743879.