From: Dirk Koopman Date: Wed, 3 Jun 2009 21:01:21 +0000 (+0100) Subject: fix warnings in debug.c in the C Client X-Git-Tag: 1.56~52 X-Git-Url: http://dxcluster.net/gitweb/gitweb.cgi?a=commitdiff_plain;h=5b66ad22854dc7084805ce4147780173264436b5;p=spider.git fix warnings in debug.c in the C Client --- diff --git a/perl/Version.pm b/perl/Version.pm index 4dce6193..14b04531 100644 --- a/perl/Version.pm +++ b/perl/Version.pm @@ -11,6 +11,6 @@ use vars qw($version $subversion $build); $version = '1.55'; $subversion = '0'; -$build = '43'; +$build = '44'; 1; diff --git a/src/debug.c b/src/debug.c index d4899434..22adf0cf 100755 --- a/src/debug.c +++ b/src/debug.c @@ -141,14 +141,14 @@ void dbg(unsigned long level, char *format, ...) rotate_log(); - sprintf(dbuf, "%s %s[%d,%04x] ", dbgtime(), prog, pid, level); + sprintf(dbuf, "%s %s[%d,%04lx] ", dbgtime(), prog, pid, level); va_start(ap, format); vsprintf(buf, format, ap); i = strlen(buf); if (i>1 && buf[i-1] == '\n') buf[i-1] = 0; - fprintf(f, dbuf); - fprintf(f, buf); + fprintf(f, "%s", dbuf); + fprintf(f, "%s", buf); fputc('\n', f); va_end(ap); fflush(f); @@ -172,7 +172,7 @@ void dbgdump(unsigned long level, char *dir, unsigned char *s, int lth) rotate_log(); - sprintf(buf, "%s %s[%d,%04x] %s Lth: %d", dbgtime(), prog, pid, level, dir, lth); + sprintf(buf, "%s %s[%d,%04lx] %s Lth: %d", dbgtime(), prog, pid, level, dir, lth); fprintf(f, "%s\n", buf); if (dbgproc) { (dbgproc)(buf);