Fix initialization before immediate reassignment

Issue(s) found via [cppcheck](http://cppcheck.sourceforge.net/).