# HG changeset patch # User Matti Hamalainen # Date 1290305536 -7200 # Node ID 659b8229d01584d5465078a21e3af842921307fe # Parent da539f54c9b02189654cbf1b148e7795cf3f7cb6 Silence some warnings on OpenBSD. diff -r da539f54c9b0 -r 659b8229d015 libnnchat.c --- a/libnnchat.c Sun Nov 21 01:01:59 2010 +0200 +++ b/libnnchat.c Sun Nov 21 04:12:16 2010 +0200 @@ -288,7 +288,7 @@ PUSHCHAR(*s); else { char tmpStr[4]; - sprintf(tmpStr, "%2X", (unsigned char) *s); + snprintf(tmpStr, sizeof(tmpStr), "%2X", (unsigned char) *s); PUSHCHAR('%'); PUSHSTR(tmpStr); } diff -r da539f54c9b0 -r 659b8229d015 th_config.c --- a/th_config.c Sun Nov 21 01:01:59 2010 +0200 +++ b/th_config.c Sun Nov 21 04:12:16 2010 +0200 @@ -227,7 +227,7 @@ { va_list ap; va_start(ap, fmt); - fprintf(stderr, "%s: '%s', line #%d: ", th_prog_name, f->filename, f->line); + fprintf(stderr, "%s: '%s', line #%d: ", th_prog_name, f->filename, (unsigned int) f->line); vfprintf(stderr, fmt, ap); va_end(ap); }