Fix code which generates warnings on clang