Update CMake subtree, fix cppcheck errors