Thanks,
I don't know why I did that :(
Anyhow, thanks a lot. I will consider it more next time.

Daniel Juyung Seo (SeoZ)

On Wed, Aug 24, 2011 at 11:09 PM, Tom Hacohen
<[email protected]> wrote:
> On 24/08/11 17:04, Gustavo Sverzut Barbieri wrote:
>> On Wed, Aug 24, 2011 at 5:10 AM, Enlightenment SVN<
>> [email protected]>  wrote:
>>
>>> Log:
>>> elm toolbar: Fixed build warnings.
>>>
>>> -   char *txt = item->access_info;
>>> +   char *txt = (char *)item->access_info;
>>>     if (!txt) txt = (char *)it->label;
>>>     if (txt) return strdup(txt);
>>>     return txt;
>>
>>
>> Hey Seoz, don't fix the bugs like this... it is not wrong, but not
>> recommended to fix the problem at the wrong place.
>>
>> Consider the following solution:
>>     const char *txt = item->access_info;
>>     if (!txt) txt = it->label;
>>     if (txt) return strdup(txt);
>>     return NULL;
>>
>> no cast abuse, make it clear of the usage and the return of NULL.
>>
>> moreover, the function signature has item marked as __UNUSED__ while it's
>> being used... pfff :-/
>>
>
> +1. We enable/fix warnings because we want to detect bad usage, not make
> the compilers silence no matter what your cflags are. Just casting is
> bad, very bad, and can lead to errors. Same goes with mike's comment
> about __UNUSED__.
>
> This applies to all warnings, not just casting.
>
> --
> Tom.
>
> ------------------------------------------------------------------------------
> EMC VNX: the world's simplest storage, starting under $10K
> The only unified storage solution that offers unified management
> Up to 160% more powerful than alternatives and 25% more efficient.
> Guaranteed. http://p.sf.net/sfu/emc-vnx-dev2dev
> _______________________________________________
> enlightenment-devel mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/enlightenment-devel
>

------------------------------------------------------------------------------
EMC VNX: the world's simplest storage, starting under $10K
The only unified storage solution that offers unified management 
Up to 160% more powerful than alternatives and 25% more efficient. 
Guaranteed. http://p.sf.net/sfu/emc-vnx-dev2dev
_______________________________________________
enlightenment-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel

Reply via email to