COMP: Fix various Coverity warnings

Looking through the Coverity warnings, almost all
were low hanging fruit, so I fixed several.

Change-Id: I76f2b8b45229d98729de6f63f2ef86a969749235
Merge topic 'MiscCoverityWarningsFix'

1026584b COMP: Fix various Coverity warnings