svn commit: trunk/busybox

Bernhard Fischer rep.dot.nop at gmail.com
Tue Jan 23 01:07:49 UTC 2007


On Tue, Jan 23, 2007 at 01:53:41AM +0100, Denis Vlasenko wrote:
>On Tuesday 23 January 2007 01:40, Bernhard Fischer wrote:
>> On Mon, Jan 22, 2007 at 11:59:23PM +0100, Denis Vlasenko wrote:
>> >On Monday 22 January 2007 18:50, aldot at busybox.net wrote:
>> >> Author: aldot
>> >> Date: 2007-01-22 09:50:21 -0800 (Mon, 22 Jan 2007)
>> >> New Revision: 17468
>> >> 
>> >> Log:
>> >> - add more strict prototype checking to catch wrong and broken code (like nested functions)

>But what if I cannot convert nested function into non-nestet
>without major changes?

Nested functions are ugly and are not supported by all C compilers (i
know that we are using more and more C99 features as time passes on)

If fixing it turns out to be much, much larger then i'd just leave it
alone. If it only adds a few bytes, then i would either ignore the error
or not ask cc to complain about it.

Remember that -29byte patch that you said was just observable on i386?
If we don't take that 29 Bytes but if it costs a few bytes to make the
code clean, then i'm for the cleanlyness.

>
>findutils/find.c:
>
>static action*** parse_params(char **argv)
>{
>        action*** appp;
>        int cur_group = 0;
>        int cur_action = 0;
>
>        action* alloc_action(int sizeof_struct, action_fp f)
>        {
>                action *ap;
>                appp[cur_group] = xrealloc(appp[cur_group], (cur_action+2) * sizeof(*appp));
>                appp[cur_group][cur_action++] = ap = xmalloc(sizeof_struct);
>                appp[cur_group][cur_action] = NULL;
>                ap->f = f;
>                return ap;
>        }
>
>IOW: can we use nested functions without warnings?

We can't, no. And i think that this is a feature, don't have the
standard at hand, though, so that's a wild guess.

Just my 2 cents..



More information about the busybox mailing list