remove warnings on OSX (workaround)
Fix cast warnings on 64bits
doc: Fix doxygen warnings.