remove compiler warnings with the help of four new utility functions

fixes Sharpie/RTikZDevice#68