php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #4976 my_init.c:106: warning: int format, long int arg (with patch)
Submitted: 2000-06-12 13:35 UTC Modified: 2000-06-12 18:29 UTC
From: juhl at eisenstein dot dk Assigned:
Status: Closed Package: Compile Warning
PHP Version: 4.0.0 Release OS: Linux
Private report: No CVE-ID: None
 [2000-06-12 13:35 UTC] juhl at eisenstein dot dk
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

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2000-06-12 18:29 UTC] rasmus at cvs dot php dot net
Please send this patch to the mysql guys.  They maintain this code.
 
PHP Copyright © 2001-2023 The PHP Group
All rights reserved.
Last updated: Mon Jan 30 16:05:53 2023 UTC