svn: /php/php-src/ branches/PHP_5_3/ext/fileinfo/fileinfo.c branches/PHP_5_3/ext/fileinfo/libmagic/magic.c
branches/PHP_5_3/ext/fileinfo/libmagic.patch branches/PHP_5_4/ext/fileinfo/fileinfo.c branches/PHP_5_4/ext/fileinfo/libmagic/magic.c
branches/PHP_5_4/ext/fileinfo/libmagic.patch trunk/ext/fileinfo/fileinfo.c trunk/ext/fileinfo/libmagic/magic.c trunk/ext/fileinfo/libmagic.patch
| From: | Xinchen Hui | Date: | Tue, 09 Aug 2011 05:11:19 +0000 |
| Subject: | svn: /php/php-src/ branches/PHP_5_3/ext/fileinfo/fileinfo.c branches/PHP_5_3/ext/fileinfo/libmagic/magic.c branches/PHP_5_3/ext/fileinfo/libmagic.patch branches/PHP_5_4/ext/fileinfo/fileinfo.c branches/PHP_5_4/ext/fileinfo/libmagic/magic.c branches/PHP_5_4/ext/fileinfo/libmagic.patch trunk/ext/fileinfo/fileinfo.c trunk/ext/fileinfo/libmagic/magic.c trunk/ext/fileinfo/libmagic.patch |
||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-65797@lists.php.net to get a copy of this message | ||
laruence Tue, 09 Aug 2011 05:11:19 +0000
Revision: http://svn.php.net/viewvc?view=revision&revision=314584
Log:
Eliminated compiler's warnings and make static analyzer silent
Changed paths:
U php/php-src/branches/PHP_5_3/ext/fileinfo/fileinfo.c
U php/php-src/branches/PHP_5_3/ext/fileinfo/libmagic/magic.c
U php/php-src/branches/PHP_5_3/ext/fileinfo/libmagic.patch
U php/php-src/branches/PHP_5_4/ext/fileinfo/fileinfo.c
U php/php-src/branches/PHP_5_4/ext/fileinfo/libmagic/magic.c
U php/php-src/branches/PHP_5_4/ext/fileinfo/libmagic.patch
U php/php-src/trunk/ext/fileinfo/fileinfo.c
U php/php-src/trunk/ext/fileinfo/libmagic/magic.c
U php/php-src/trunk/ext/fileinfo/libmagic.patch
Modified: php/php-src/branches/PHP_5_3/ext/fileinfo/fileinfo.c
===================================================================
--- php/php-src/branches/PHP_5_3/ext/fileinfo/fileinfo.c 2011-08-09 03:49:42 UTC (rev 314583)
+++ php/php-src/branches/PHP_5_3/ext/fileinfo/fileinfo.c 2011-08-09 05:11:19 UTC (rev 314584)
@@ -392,7 +392,7 @@
long options = 0;
char *ret_val = NULL, *buffer = NULL;
int buffer_len;
- struct php_fileinfo *finfo;
+ struct php_fileinfo *finfo = NULL;
zval *zfinfo, *zcontext = NULL;
zval *what;
char mime_directory[] = "directory";
Modified: php/php-src/branches/PHP_5_3/ext/fileinfo/libmagic/magic.c
===================================================================
--- php/php-src/branches/PHP_5_3/ext/fileinfo/libmagic/magic.c 2011-08-09 03:49:42 UTC (rev 314583)
+++ php/php-src/branches/PHP_5_3/ext/fileinfo/libmagic/magic.c 2011-08-09 05:11:19 UTC (rev 314584)
@@ -291,9 +291,9 @@
if (!stream && inname) {
no_in_stream = 1;
#if PHP_API_VERSION < 20100412
- stream = php_stream_open_wrapper(inname, "rb", REPORT_ERRORS|ENFORCE_SAFE_MODE, NULL);
+ stream = php_stream_open_wrapper((char *)inname, "rb", REPORT_ERRORS|ENFORCE_SAFE_MODE,
NULL);
#else
- stream = php_stream_open_wrapper(inname, "rb", REPORT_ERRORS, NULL);
+ stream = php_stream_open_wrapper((char *)inname, "rb", REPORT_ERRORS, NULL);
#endif
}
Modified: php/php-src/branches/PHP_5_3/ext/fileinfo/libmagic.patch
===================================================================
--- php/php-src/branches/PHP_5_3/ext/fileinfo/libmagic.patch 2011-08-09 03:49:42 UTC (rev 314583)
+++ php/php-src/branches/PHP_5_3/ext/fileinfo/libmagic.patch 2011-08-09 05:11:19 UTC (rev 314584)
@@ -2020,9 +2020,9 @@
+ if (!stream && inname) {
+ no_in_stream = 1;
+#if PHP_API_VERSION < 20100412
-+ stream = php_stream_open_wrapper(inname, "rb", REPORT_ERRORS|ENFORCE_SAFE_MODE, NULL);
++ stream = php_stream_open_wrapper((char *)inname, "rb",
REPORT_ERRORS|ENFORCE_SAFE_MODE, NULL);
+#else
-+ stream = php_stream_open_wrapper(inname, "rb", REPORT_ERRORS, NULL);
++ stream = php_stream_open_wrapper((char *)inname, "rb", REPORT_ERRORS, NULL);
+#endif
+ }
+
Modified: php/php-src/branches/PHP_5_4/ext/fileinfo/fileinfo.c
===================================================================
--- php/php-src/branches/PHP_5_4/ext/fileinfo/fileinfo.c 2011-08-09 03:49:42 UTC (rev 314583)
+++ php/php-src/branches/PHP_5_4/ext/fileinfo/fileinfo.c 2011-08-09 05:11:19 UTC (rev 314584)
@@ -388,7 +388,7 @@
long options = 0;
char *ret_val = NULL, *buffer = NULL;
int buffer_len;
- struct php_fileinfo *finfo;
+ struct php_fileinfo *finfo = NULL;
zval *zfinfo, *zcontext = NULL;
zval *what;
char mime_directory[] = "directory";
Modified: php/php-src/branches/PHP_5_4/ext/fileinfo/libmagic/magic.c
===================================================================
--- php/php-src/branches/PHP_5_4/ext/fileinfo/libmagic/magic.c 2011-08-09 03:49:42 UTC (rev 314583)
+++ php/php-src/branches/PHP_5_4/ext/fileinfo/libmagic/magic.c 2011-08-09 05:11:19 UTC (rev 314584)
@@ -291,9 +291,9 @@
if (!stream && inname) {
no_in_stream = 1;
#if PHP_API_VERSION < 20100412
- stream = php_stream_open_wrapper(inname, "rb", REPORT_ERRORS|ENFORCE_SAFE_MODE, NULL);
+ stream = php_stream_open_wrapper((char *)inname, "rb", REPORT_ERRORS|ENFORCE_SAFE_MODE,
NULL);
#else
- stream = php_stream_open_wrapper(inname, "rb", REPORT_ERRORS, NULL);
+ stream = php_stream_open_wrapper((char *)inname, "rb", REPORT_ERRORS, NULL);
#endif
}
Modified: php/php-src/branches/PHP_5_4/ext/fileinfo/libmagic.patch
===================================================================
--- php/php-src/branches/PHP_5_4/ext/fileinfo/libmagic.patch 2011-08-09 03:49:42 UTC (rev 314583)
+++ php/php-src/branches/PHP_5_4/ext/fileinfo/libmagic.patch 2011-08-09 05:11:19 UTC (rev 314584)
@@ -2020,9 +2020,9 @@
+ if (!stream && inname) {
+ no_in_stream = 1;
+#if PHP_API_VERSION < 20100412
-+ stream = php_stream_open_wrapper(inname, "rb", REPORT_ERRORS|ENFORCE_SAFE_MODE, NULL);
++ stream = php_stream_open_wrapper((char *)inname, "rb",
REPORT_ERRORS|ENFORCE_SAFE_MODE, NULL);
+#else
-+ stream = php_stream_open_wrapper(inname, "rb", REPORT_ERRORS, NULL);
++ stream = php_stream_open_wrapper((char *)inname, "rb", REPORT_ERRORS, NULL);
+#endif
+ }
+
Modified: php/php-src/trunk/ext/fileinfo/fileinfo.c
===================================================================
--- php/php-src/trunk/ext/fileinfo/fileinfo.c 2011-08-09 03:49:42 UTC (rev 314583)
+++ php/php-src/trunk/ext/fileinfo/fileinfo.c 2011-08-09 05:11:19 UTC (rev 314584)
@@ -388,7 +388,7 @@
long options = 0;
char *ret_val = NULL, *buffer = NULL;
int buffer_len;
- struct php_fileinfo *finfo;
+ struct php_fileinfo *finfo = NULL;
zval *zfinfo, *zcontext = NULL;
zval *what;
char mime_directory[] = "directory";
Modified: php/php-src/trunk/ext/fileinfo/libmagic/magic.c
===================================================================
--- php/php-src/trunk/ext/fileinfo/libmagic/magic.c 2011-08-09 03:49:42 UTC (rev 314583)
+++ php/php-src/trunk/ext/fileinfo/libmagic/magic.c 2011-08-09 05:11:19 UTC (rev 314584)
@@ -291,9 +291,9 @@
if (!stream && inname) {
no_in_stream = 1;
#if PHP_API_VERSION < 20100412
- stream = php_stream_open_wrapper(inname, "rb", REPORT_ERRORS|ENFORCE_SAFE_MODE, NULL);
+ stream = php_stream_open_wrapper((char *)inname, "rb", REPORT_ERRORS|ENFORCE_SAFE_MODE,
NULL);
#else
- stream = php_stream_open_wrapper(inname, "rb", REPORT_ERRORS, NULL);
+ stream = php_stream_open_wrapper((char *)inname, "rb", REPORT_ERRORS, NULL);
#endif
}
Modified: php/php-src/trunk/ext/fileinfo/libmagic.patch
===================================================================
--- php/php-src/trunk/ext/fileinfo/libmagic.patch 2011-08-09 03:49:42 UTC (rev 314583)
+++ php/php-src/trunk/ext/fileinfo/libmagic.patch 2011-08-09 05:11:19 UTC (rev 314584)
@@ -2020,9 +2020,9 @@
+ if (!stream && inname) {
+ no_in_stream = 1;
+#if PHP_API_VERSION < 20100412
-+ stream = php_stream_open_wrapper(inname, "rb", REPORT_ERRORS|ENFORCE_SAFE_MODE, NULL);
++ stream = php_stream_open_wrapper((char *)inname, "rb",
REPORT_ERRORS|ENFORCE_SAFE_MODE, NULL);
+#else
-+ stream = php_stream_open_wrapper(inname, "rb", REPORT_ERRORS, NULL);
++ stream = php_stream_open_wrapper((char *)inname, "rb", REPORT_ERRORS, NULL);
+#endif
+ }
+