remove some warnings produced by clang and fix tests.