PHP 4.0 Bug #4976: my_init.c:106: warning: int format, long int arg (with patch)
| From: | juhl at eisenstein dot dk | Date: | Mon, 12 Jun 2000 11:35:20 +0000 |
| Subject: | PHP 4.0 Bug #4976: my_init.c:106: warning: int format, long int arg (with patch) | ||
| Groups: | php.dev | ||
| Request: | Send a blank email to php-dev+get-21091@lists.php.net to get a copy of this message | ||
From: juhl@eisenstein.dk
Operating system: Linux
PHP version: 4.0.0 Release
PHP Bug Type: Compile Warning
Bug description: my_init.c:106: warning: int format, long int arg (with patch)
Configuring like this: ./configure --with-mysql yields the following compiler warnings in
php-4.0.0/ext/mysql/libmysql/my_init.c
my_init.c:106: warning: int format, long int arg (arg 5)
my_init.c:106: warning: int format, long int arg (arg 6)
my_init.c:106: warning: int format, long int arg (arg 7)
my_init.c:106: warning: int format, long int arg (arg 8)
my_init.c:106: warning: int format, long int arg (arg 9)
my_init.c:106: warning: int format, long int arg (arg 10)
my_init.c:106: warning: int format, long int arg (arg 11)
my_init.c:106: warning: int format, long int arg (arg 12)
my_init.c:106: warning: int format, long int arg (arg 13)
my_init.c:106: warning: int format, long int arg (arg 14)
my_init.c:106: warning: int format, long int arg (arg 15)
my_init.c:106: warning: int format, long int arg (arg 16)
The following patch eliminates those warnings :
/*************** PATCH START **************/
--- php-4.0.0/ext/mysql/libmysql/my_init.c Sat Feb 19 11:10:46 2000
+++ php-4.0.0jju/ext/mysql/libmysql/my_init.c Sun Jun 4 13:26:04 2000
@@ -94,7 +94,7 @@
#ifdef HAVE_GETRUSAGE
struct rusage rus;
if (!getrusage(RUSAGE_SELF, &rus))
- fprintf(info_file,"\nUser time %.2f, System time %.2f\nMaximum resident set size %d,
Integral resident set size %d\nNon physical pagefaults %d, Physical pagefaults %d, Swaps %d\nBlocks
in %d out %d, Messages in %d out %d, Signals %d\nVouluntary context switches %d, Invouluntary
context switches %d\n",
+ fprintf(info_file,"\nUser time %.2f, System time %.2f\nMaximum resident set size %ld,
Integral resident set size %ld\nNon physical pagefaults %ld, Physical pagefaults %ld, Swaps
%ld\nBlocks in %ld out %ld, Messages in %ld out %ld, Signals %ld\nVouluntary context switches %ld,
Invouluntary context switches %ld\n",
(rus.ru_utime.tv_sec * SCALE_SEC +
rus.ru_utime.tv_usec / SCALE_USEC) / 100.0,
(rus.ru_stime.tv_sec * SCALE_SEC +
/*************** PATCH END **************/
Best regards
Jesper Juhl
juhl@eisenstein.dk