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 <[email protected]>:
> 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/
--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php