From: Hartmut Holzgraefe Date: Fri, 26 Sep 2003 07:47:01 +0000 (+0000) Subject: compiler warning fixes, one of them a potential crash bug X-Git-Tag: RELEASE_1_3b2~58 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=ee922e30855e3263efe5ddbf267c4489d1774a9b;p=php compiler warning fixes, one of them a potential crash bug --- diff --git a/ext/mime_magic/mime_magic.c b/ext/mime_magic/mime_magic.c index fdb2966691..a345dc2e20 100644 --- a/ext/mime_magic/mime_magic.c +++ b/ext/mime_magic/mime_magic.c @@ -182,7 +182,7 @@ static int apprentice(void); static int ascmagic(unsigned char *, int); -static int is_tar(unsigned char *, int); +static int is_tar(unsigned char *, unsigned int); static int softmagic(unsigned char *, int); static void tryit(unsigned char *, int, int); @@ -576,7 +576,7 @@ static int parse(char *l, int lineno) t = l; if (*t++ != ')') { if(MIME_MAGIC_G(debug)) - php_error_docref("http://www.php.net/mime_magic" TSRMLS_CC, E_WARNING, ": (%s:%s) missing ')' in indirect offset", MIME_MAGIC_G(magicfile), lineno); + php_error_docref("http://www.php.net/mime_magic" TSRMLS_CC, E_WARNING, ": (%s:%d) missing ')' in indirect offset", MIME_MAGIC_G(magicfile), lineno); } l = t; } @@ -1460,7 +1460,7 @@ static int ascmagic(unsigned char *buf, int nbytes) * old UNIX tar file, 2 for Unix Std (POSIX) tar file. */ -static int is_tar(unsigned char *buf, int nbytes) +static int is_tar(unsigned char *buf, unsigned int nbytes) { register union record *header = (union record *) buf; register int i;