In findutils/find.c, the 'static' keyword was dropped, for GCC 4.x
compatibility. The right keyword
is 'auto', which I have added here. On my 3.0 and 4.2.0 compilers, I still get
a no-prototype
warning even with the 'auto' keyword, so I also inserted a prototype just
before the actual
function. It looks a bit silly, but it seems to be what gcc wants. Here's a
diff:
*** busybox-1.9.1.orig/findutils/find.c 2008-02-12 11:03:12.000000000 -0500
--- busybox-1.9.1/findutils/find.c 2008-03-04 12:19:13.000000000 -0500
***************
*** 513,519 ****
USE_FEATURE_FIND_NOT( bool invert_flag = 0; )
/* 'static' doesn't work here! (gcc 4.1.2) */
! action* alloc_action(int sizeof_struct, action_fp f)
{
action *ap;
appp[cur_group] = xrealloc(appp[cur_group],
(cur_action+2) * sizeof(*appp));
--- 513,521 ----
USE_FEATURE_FIND_NOT( bool invert_flag = 0; )
/* 'static' doesn't work here! (gcc 4.1.2) */
! /* GCC may give a warning without the prototype. */
! auto action* alloc_action(int sizeof_struct, action_fp f);
! auto action* alloc_action(int sizeof_struct, action_fp f)
{
action *ap;
appp[cur_group] = xrealloc(appp[cur_group],
(cur_action+2) * sizeof(*appp));
_______________________________________________
busybox mailing list
[email protected]
http://busybox.net/cgi-bin/mailman/listinfo/busybox