Fixed warnings emitted by 'cppcheck' and 'clang --analyze' - thanks Daniele.