remove compiler warnings with the help of four new utility functions

fixes Sharpie/RTikZDevice#68
Merge pull request #3 from krlmlr/68-c-warnings

remove compiler warnings with the help of four new utility functions