Fixed some compilation errors with clang

When compiling onion with clang, I have some errors here, so I juste added some fixing which don't modify the core (I think)