On 05/27/2011 12:17 AM, Vincent Torri wrote:
>
>
> On Thu, 26 May 2011, Enlightenment SVN wrote:
>
>> Log:
>> Evas: Fix shadow declaration of 'i' variable.
>>
>>
>>
>> Author:       devilhorns
>> Date:         2011-05-26 18:50:10 -0700 (Thu, 26 May 2011)
>> New Revision: 59716
>> Trac:         http://trac.enlightenment.org/e/changeset/59716
>>
>> Modified:
>>   trunk/evas/src/bin/evas_cserve_tool.c
>>
>> Modified: trunk/evas/src/bin/evas_cserve_tool.c
>> ===================================================================
>> --- trunk/evas/src/bin/evas_cserve_tool.c    2011-05-27 01:47:58 UTC (rev 
>> 59715)
>> +++ trunk/evas/src/bin/evas_cserve_tool.c    2011-05-27 01:50:10 UTC (rev 
>> 59716)
>> @@ -10,7 +10,7 @@
>> main(int argc, char **argv)
>> {
>>     int i;
>> -
>> +
>>     evas_init();
>>     if (!evas_cserve_init())
>>       {
>> @@ -86,8 +86,8 @@
>>            {
>>               Op_Getinfo_Reply *info;
>>               unsigned char *p;
>> -             int i, j;
>> -
>> +             int h, j;
>> +
>>               info = evas_cserve_raw_info_get();
>>               if (!info)
>>                 {
>> @@ -102,7 +102,7 @@
>>               printf("cache_memory: %i Kb\n", info->cached.mem_total);
>>               p = (unsigned char *)info;
>>               p += sizeof(Op_Getinfo_Reply);
>> -             for (i = 0; i<  j; i++)
>> +             for (h = 0; h<  j; h++)
>
> actually, why not just using i again without the declaration of the
> sub-block ? i is certainly just used for the 'for' loop
>
> Vincent
>
Yea, suppose it could have been done like that also...but in all 
honesty, I was just handling the compiler warnings and not really 
'reading' the code as I was pressed for time, so it was just a 'quick 
fix' that 'should not break anything'.

If it's something that bugs you, feel free to fix ;)

dh

>>                 {
>>                    Op_Getinfo_Item it;
>>                    char *file, *key, buf[512];
>> @@ -111,7 +111,7 @@
>>                    memcpy(&it, p, sizeof(Op_Getinfo_Item));
>>                    file = (char*) (p + sizeof(Op_Getinfo_Item));
>>                    key = file + strlen(file) + 1;
>> -                  printf("-IMAGE- [#%i]\n", i);
>> +                  printf("-IMAGE- [#%i]\n", h);
>>                    printf("  file       : %s\n", file);
>>                    printf("  key        : %s\n", key);
>>                    printf("  size       : %i x %i\n", it.w, it.h);
>>
>>



------------------------------------------------------------------------------
vRanger cuts backup time in half-while increasing security.
With the market-leading solution for virtual backup and recovery, 
you get blazing-fast, flexible, and affordable data protection.
Download your free trial now. 
http://p.sf.net/sfu/quest-d2dcopy1
_______________________________________________
enlightenment-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel

Reply via email to