[patch] fix warning in ipaddress.c
walter harms
wharms at bfs.de
Wed May 17 11:37:43 UTC 2006
i did not see any use either but i did not wrote the code
therefore i have scruples to remove it.
If you know that it is useless you may like the attached patch.
Bernhard Fischer wrote:
> On Wed, May 17, 2006 at 12:25:14PM +0200, walter harms wrote:
>> now with reversed order ...
>>
>> re,
>> wh
>>
>> thx for the catch peter
>>
>>
>> Peter S. Mazinger wrote:
>>> On Wed, 17 May 2006, walter harms wrote:
>>>
>>>> hi list,
>>>> this patch fixes:
>>>> In function `ipaddr_list_or_flush':
>>>> warning: declaration of `round' shadows a global declaration
>>>>
>>>> and removes an '#if 0' statement
>>>>
>>>> re,
>>>> wh
>>> I think you meant the patch w/ -R ...
>>>
>>> Peter
>>>
>
>> --- ipaddress.c.bak 2006-05-17 10:47:34.898754088 +0200
>> +++ ipaddress.c 2006-05-17 10:49:14.628592848 +0200
>> @@ -506,7 +506,7 @@
>> }
>>
>> if (flush) {
>> - int round = 0;
>> + int cnt = 0;
>> char flushb[4096-512];
>>
>> filter.flushb = flushb;
>> @@ -525,14 +525,10 @@
>> exit(1);
>> }
>> if (filter.flushed == 0) {
>> -#if 0
>> - if (round == 0)
>> - fprintf(stderr, "Nothing to flush.\n");
>> -#endif
>> fflush(stdout);
>> return 0;
>> }
>> - round++;
>> + cnt++;
>> if (flush_update() < 0)
>> exit(1);
>> }
>
> I'm a little bit irritated by your change..
> If i read this right, then you rename an unused variable instead of
> removing it. Why aren't you removing it completely?
>
> Please clarify.
> TIA,
> Bernhard
>
>
>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: ipaddress.diff
Type: text/x-patch
Size: 478 bytes
Desc: not available
Url : http://lists.busybox.net/pipermail/busybox/attachments/20060517/ada8896b/attachment.bin
More information about the busybox
mailing list