Fixed some warnings from Clang static analyse