Fixed a bunch of warnings flagged by xcode

Signed-off-by: Marc Lefrançois <mlefrancois@mirego.com>