COMP: Fix Cppcheck and Clang warnings