Fix some cppcheck warnings.
Merge pull request #2 from pal-robotics/fix-cppcheck

Fix some cppcheck warnings.