Re: utf-8?q?svn:_/php/php-src/_branches/PHP=5F5=5F4/ext/ereg/ereg.c_br anches/PHP=5F5=5F4/ext/ereg/regex/regerror.c_branches/PHP=5F5=5F4/ext/stan
dard/var.c_branches/PHP=5F5=5F4/main/streams/cast.c_trunk/ext/ereg/ereg.c_ trunk/ext/ereg/rege
| From: | Laruence | Date: | Mon, 15 Aug 2011 03:26:09 +0000 |
| Subject: | Re: utf-8?q?svn:_/php/php-src/_branches/PHP=5F5=5F4/ext/ereg/ereg.c_br anches/PHP=5F5=5F4/ext/ereg/regex/regerror.c_branches/PHP=5F5=5F4/ext/stan dard/var.c_branches/PHP=5F5=5F4/main/streams/cast.c_trunk/ext/ereg/ereg.c_ trunk/ext/ereg/rege |
||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-65854@lists.php.net to get a copy of this message | ||
Hi:
"smart_str_append_long(buf, (long)Z_OBJCE_P(struc)->name_length);"
if you expand the macro, then it will result a :
if (num < 0) { \
smart_str_print_unsigned4((buf), -(num), vartype, (result)); \
*--(result) = '-'; \
} else { \
smart_str_print_unsigned4((buf), (num), vartype, (result)); \
}
and the Compiler(GCC) will complain that num have no chance to be
a negative, if you wondering why:
because, in 64-bit os, when do the type cast (unsigned int) ->
(long), the highest bit (which known as sign bit two) will always set
to 0,
I was plan to change the (long) to (long)(signed), gwynne
suggesting me to use (int), and leave the second step type conversion
to complier, and I agree with him at last
thanks
2011/8/15 Stas Malyshev <smalyshev@sugarcrm.com>:
> On 8/14/11 4:25 AM, Derick Rethans wrote:
>>
>> On Fri, 12 Aug 2011, Xinchen Hui wrote:
>>
>>> laruence Fri, 12 Aug 2011 07:47:03
>>> +0000
>>>
>>> Revision:
>>> http://svn.php.net/viewvc?view=revision&revision=314808
>>>
>>> Log:
>>> Omitted GCC warning "comparison is always false"
>>
>> I don't get this commit message, as you seem to have changed \0 issues
>> almost exclusively in this patch.
>
> I'm not sure also why you did this change:
>
>
> http://svn.php.net/viewvc/php/php-src/branches/PHP_5_4/ext/standard/var.c?r1=314808&r2=314807&pathrev=314808
>
> Or why here:
>
>
> http://svn.php.net/viewvc/php/php-src/trunk/ext/ereg/regex/regerror.c?r1=314808&r2=314807&pathrev=314808
>
> zero-termination applies only to one clause.
>
>
> --
> Stanislav Malyshev, Software Architect
> SugarCRM: http://www.sugarcrm.com/
> (408)454-6900 ext. 227
>
--
Laruence Xinchen Hui
http://www.laruence.com/