Fix error and warning for clang