Clean up of warnings (tested on clang).

I tried to cleanup all of the warnings for implicit conversions. I understand that it can be a non-trivial task, for the formability issues related to type conversion can be hard to spot at a first look on the code. For this reason, I am not 100% sure I've done all the necessary edits to your code.
Nonetheless, I think that checking and cleaning up type conversion warnings would be a desirable task, giving users some larger confidence in the code reliability.

Of course, thanks for sharing such a helpful piece of software.

 
This is the offset of a field inside a structure. Also a small positive number (where "small" is however many bytes that real structures might have). I don't really think there's any true correctness to be gained by this change, is there?