Fix dead assignment
Fix getRouteByName()
Fix 'Uninitialized argument value' error
Fix resultsets
Fix "Argument with 'nonnull' attribute passed null"
Merge pull request #2006 from sjinks/scan-build

Fix issues found by static code analysis