Review/osx maverick warning fixes

This branch contains a bunch of compiler warnings for OSX 10.9 aka Mavering. Compiler infos:
<pre>$ cc -v
Apple LLVM version 5.0 (clang-500.2.79) (based on LLVM 3.3svn)
Target: x86_64-apple-darwin13.0.0
Thread model: posix
</pre>

I'm not sure about commits cd85779 and 02ecaf7.