fix warnings found by the analyzer
Merge pull request #985 from devoncarew/devoncarew_fix_warnings

fix warnings found by the analyzer