fixed clang warnings

Please read my last email about fixing advanced warnings.