Stefan Esser wrote:
Hi, I don't know what you're running but here size_t is unsigned int.
It's probably unsigned long on 64bit boxen, so what's this fix about?
The question is: what are you running? size_t usually is unsigned long.

[EMAIL PROTECTED]:~/devel/testimonials$ cat printf.c
#include <stdio.h>

int main(int argc, char *argv[]) {
       char tmp[3];
       size_t szo = sizeof(tmp);

       printf("%d %u %ld %lu\n", sizeof(tmp), sizeof(tmp), sizeof(tmp), 
sizeof(tmp));
       printf("%d %u %ld %lu\n", szo, szo, szo, szo);
       return 0;
}
[EMAIL PROTECTED]:~/devel/testimonials$ gcc -o printf -Wall printf.c
printf.c: In function ‘main’:
printf.c:7: warning: format ‘%ld’ expects type ‘long int’, but argument 4 has 
type ‘unsigned int’
printf.c:7: warning: format ‘%lu’ expects type ‘long unsigned int’, but 
argument 5 has type ‘unsigned int’
printf.c:8: warning: format ‘%ld’ expects type ‘long int’, but argument 4 has 
type ‘size_t’
printf.c:8: warning: format ‘%lu’ expects type ‘long unsigned int’, but 
argument 5 has type ‘size_t’
[EMAIL PROTECTED]:~/devel/testimonials$ gcc -v
Using built-in specs.
Target: i486-linux-gnu
Configured with: ../src/configure -v 
--enable-languages=c,c++,java,f95,objc,ada,treelang --prefix=/usr 
--enable-shared --with-system-zlib --libexecdir=/usr/lib 
--without-included-gettext --enable-threads=posix --enable-nls 
--program-suffix=-4.0 --enable-__cxa_atexit --enable-clocale=gnu 
--enable-libstdcxx-debug --enable-java-awt=gtk-default --enable-gtk-cairo 
--with-java-home=/usr/lib/jvm/java-1.4.2-gcj-4.0-1.4.2.0/jre --enable-mpfr 
--disable-werror --with-tune=pentium4 --enable-checking=release i486-linux-gnu
Thread model: posix
gcc version 4.0.3 (Ubuntu 4.0.3-1ubuntu5)
[EMAIL PROTECTED]:~/devel/testimonials$ uname -a
Linux honeybadger 2.6.15-23-686 #1 SMP PREEMPT Tue May 23 14:03:07 UTC 2006 
i686 GNU/Linux

I'm running nothing uncommon, I guess?

Regards,
--
Michael

--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to