Re: [ZEND-ENGINE-CVS] cvs: ZendEngine2 / zend_execute_API.c
| From: | Marcus Boerger | Date: | Tue, 28 Sep 2004 20:05:37 +0000 |
| Subject: | Re: [ZEND-ENGINE-CVS] cvs: ZendEngine2 / zend_execute_API.c | ||
| References: | 1 2 3 4 5 | Groups: | php.zend-engine.cvs |
| Request: | Send a blank email to php-zend-engine-cvs+get-3057@lists.php.net to get a copy of this message | ||
Hello Andi,
if we use it for a check only then shouldn't a) the compiler find where
and b) it still work becuse -1 will translate to ~0 then?
marcus
Tuesday, September 28, 2004, 9:45:19 PM, you wrote:
> Yes, but we'd just need to be 100% sure that we're never assigning a
> negative number (like -1) to this value, for whatever reason it might be.
> Andi
> At 09:08 AM 9/28/2004 +0100, Wez Furlong wrote:
>>Surely a better fix is to fix the type in the struct?
>>
>>--Wez.
>>
>>
>>On Mon, 27 Sep 2004 20:34:07 +0200, Marcus Boerger <helly@php.net> wrote:
>> > Hello Andi,
>> >
>> > Monday, September 27, 2004, 6:40:49 PM, you wrote:
>> >
>> > > str.len used to be able to be -1. I can't quite remember when but we used
>> > > it to mark a special case. I am not sure if it's still required today.
>> > > I prefer not casting such places so that we remember to check back
>> and see
>> > > why the warning is happening. You are only suppressing a warning but not
>> > > fixing anything.
>> >
>> > Yep. I checked it and found out that the cast is ok. So suppressing that
>> > warning was good to avoid looking at it again and again. I asked because
>> > i was simply curious for the reason. No real need to change it.
>> >
>> > regards
>> > marcus
>> >
>> > > Your previous commits were OK because they actually solved warnings
>> without
>> > > casting.
>> >
>> > > Andi
>> >
>> > > At 08:50 AM 9/27/2004 +0000, Marcus Boerger wrote:
>> > >>helly Mon Sep 27 04:50:43 2004 EDT
>> > >>
>> > >> Modified files:
>> > >> /ZendEngine2 zend_execute_API.c
>> > >> Log:
>> > >> - Fix warning
>> > >> # What's the reason _zvalue_value.str.len is int instead of
>> uint/zend_uint?
>> > >>
>> > >>
>> >
>> >>Ã{òhi
>> >>òÅ5¨ìFŸhttp://cvs.php.net/diff.php/ZendEngine2/zend_execute_API.c?r1=1.299&r2
>> =1.300&ty=u
>> > >>Index: ZendEngine2/zend_execute_API.c
>> > >>diff -u ZendEngine2/zend_execute_API.c:1.299
>> > >>ZendEngine2/zend_execute_API.c:1.300
>> > >>--- ZendEngine2/zend_execute_API.c:1.299 Thu Sep 23 17:43:32 2004
>> > >>+++ ZendEngine2/zend_execute_API.c Mon Sep 27 04:50:41 2004
>> > >>@@ -17,7 +17,7 @@
>> > >>
>> > >>
>> +----------------------------------------------------------------------+
>> > >> */
>> > >>
>> > >>-/* $Id: zend_execute_API.c,v 1.299 2004/09/23 21:43:32 andi Exp $ */
>> > >>+/* $Id: zend_execute_API.c,v 1.300 2004/09/27 08:50:41 helly Exp $ */
>> > >>
>> > >> #include <stdio.h>
>> > >> #include <signal.h>
>> > >>@@ -479,7 +479,7 @@
>> > >> continue;
>> > >> }
>> > >>
>> > >>- if (const_value.type == IS_STRING &&
>> > >>const_value.value.str.len == str_index_len-1 &&
>> > >>+ if (const_value.type == IS_STRING &&
>> > >>(uint)const_value.value.str.len == str_index_len-1 &&
>> > >> !strncmp(const_value.value.str.val,
>> str_index,
>> > >> str_index_len)) {
>> > >> /* constant value is the same as its
>> name */
>> > >> zval_dtor(&const_value);
>> > >>
>> > >>--
>> > >>Zend Engine CVS Mailing List (http://cvs.php.net/)
>> > >>To unsubscribe, visit:
>> > >>http://www.php.net/unsub.php
>> >
>> > --
>> > Best regards,
>> > Marcus
>> > mailto:helly@php.net
>> >
>> >
>> >
>> > --
>> > Zend Engine CVS Mailing List (http://cvs.php.net/)
>> > To unsubscribe, visit: http://www.php.net/unsub.php
>> >
>> >
>>
>>--
>>Zend Engine CVS Mailing List (http://cvs.php.net/)
>>To unsubscribe, visit: http://www.php.net/unsub.php
--
Best regards,
Marcus mailto:helly@php.net