Re: [PATCH] kill a few compiler warnings in 5_1 branch
Hello Steph,
a few minor corrections to your patch, can you send the full patch in one
file?
best regards
marcus
Friday, February 24, 2006, 3:05:15 PM, you wrote:
> Index: Zend/zend_vm_execute.h
> ===================================================================
> RCS file: /repository/ZendEngine2/zend_vm_execute.h,v
> retrieving revision 1.62.2.24
> diff -u -r1.62.2.24 zend_vm_execute.h
> --- Zend/zend_vm_execute.h 6 Feb 2006 11:45:56 -0000 1.62.2.24
> +++ Zend/zend_vm_execute.h 24 Feb 2006 01:27:44 -0000
> @@ -7553,7 +7553,7 @@
> HashTable *fe_ht;
> zend_object_iterator *iter = NULL;
> int key_type;
> - zend_bool use_key = opline->extended_value & ZEND_FE_FETCH_WITH_KEY;
> + zend_bool use_key = (zend_bool)opline->extended_value & ZEND_FE_FETCH_WITH_KEY;
+ zend_bool use_key = (zend_bool)(opline->extended_value & ZEND_FE_FETCH_WITH_KEY);
>
> PZVAL_LOCK(array);
>
>Index: ext/com_dotnet/com_saproxy.c
>===================================================================
>RCS file: /repository/php-src/ext/com_dotnet/com_saproxy.c,v
>retrieving revision 1.15.2.2
>diff -u -r1.15.2.2 com_saproxy.c
>--- ext/com_dotnet/com_saproxy.c 1 Jan 2006 12:50:00 -0000 1.15.2.2
>+++ ext/com_dotnet/com_saproxy.c 24 Feb 2006 00:34:20 -0000
>@@ -160,7 +160,7 @@
> return return_value;
> }
>
>- if (dims - 1 == proxy->dimensions) {
>+ if ((int)dims - 1 == proxy->dimensions) {
+ if ((int)(dims - 1) == proxy->dimensions) {
> LONG *indices;
> VARTYPE vt;
> VARIANT v;
>Index: ext/standard/array.c
>===================================================================
>RCS file: /repository/php-src/ext/standard/array.c,v
>retrieving revision 1.308.2.17
>diff -u -r1.308.2.17 array.c
>--- ext/standard/array.c 7 Feb 2006 17:54:24 -0000 1.308.2.17
>+++ ext/standard/array.c 24 Feb 2006 12:41:17 -0000
>@@ -1810,14 +1810,14 @@
> /* Clamp the offset.. */
> if (offset > num_in)
> offset = num_in;
>- else if (offset < 0 && (offset=num_in+offset) < 0)
>+ else if (offset < 0 && (offset = num_in + offset) < 0)
+ else if (offset < 0 && (offset = (num_in + offset)) < 0)
> offset = 0;
>
> /* ..and the length */
> if (length < 0) {
>- length = num_in-offset+length;
>- } else if (((unsigned) offset + (unsigned) length) > num_in) {
>- length = num_in-offset;
>+ length = num_in - offset + length;
>+ } else if (((unsigned)offset + (unsigned)length) > (unsigned)num_in) {
>+ length = num_in - offset;
> }
>
> /* Create and initialize output hash */
>@@ -2204,14 +2204,14 @@
> /* Clamp the offset.. */
> if (offset_val > num_in)
> return;
>- else if (offset_val < 0 && (offset_val=num_in+offset_val) < 0)
>+ else if (offset_val < 0 && (offset_val = num_in + offset_val) < 0)
+ else if (offset_val < 0 && (offset_val = (num_in + offset_val)) < 0)
> offset_val = 0;
>
> /* ..and the length */
> if (length_val < 0) {
>- length_val = num_in-offset_val+length_val;
>- } else if (((unsigned) offset_val + (unsigned) length_val) > num_in) {
>- length_val = num_in-offset_val;
>+ length_val = num_in - offset_val + length_val;
>+ } else if (((unsigned)offset_val + (unsigned)length_val) > (unsigned)num_in) {
>+ length_val = num_in - offset_val;
> }
>
> if (length_val == 0)
Best regards,
Marcus
Thread (2 messages)