Using clang (on osx) yields to some warnings (conversion between signed/unsigned, unused variable) which gcc would only produce when used with -Wall. This commit fixes those.