Re: [ZEND-ENGINE-CVS] cvs: ZendEngine2 / zend_execute_API.c
| From: | Andi Gutmans | Date: | Tue, 28 Sep 2004 19:45:19 +0000 |
| Subject: | Re: [ZEND-ENGINE-CVS] cvs: ZendEngine2 / zend_execute_API.c | ||
| References: | 1 2 3 4 | Groups: | php.zend-engine.cvs |
| Request: | Send a blank email to php-zend-engine-cvs+get-3055@lists.php.net to get a copy of this message | ||
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 backand seewhy 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 marcusYour previous commits were OK because they actually solved warningswithoutcasting.AndiAt 08:50 AM 9/27/2004 +0000, Marcus Boerger wrote:uint/zend_uint?helly Mon Sep 27 04:50:43 2004 EDTModified files:/ZendEngine2 zend_execute_API.cLog: - Fix warning # What's the reason _zvalue_value.str.len is int instead of=1.300&ty=uhttp://cvs.php.net/diff.php/ZendEngine2/zend_execute_API.c?r1=1.299&r2str_index,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,name */str_index_len)) {/* constant value is the same as its-- Best regards,zval_dtor(&const_value); -- Zend Engine CVS Mailing List (http://cvs.php.net/) To unsubscribe, visit: http://www.php.net/unsub.phpMarcus 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