fixed gcc and clang warnings