add gcc printf typecheck magic to print() and fix the three warnings found.

/* http://gcc.gnu.org/onlinedocs/gcc/Function-Attributes.html */
void print(log_level_t lvl, const char *format, void *id, ... )
       __attribute__ ((format (printf, 2, 4)));
Merge pull request #8 from r00t-/master

add gcc printf typecheck magic to print() and fix the three warnings found.