diff options
author | Denis Vlasenko <vda.linux@googlemail.com> | 2008-03-20 13:13:09 +0000 |
---|---|---|
committer | Denis Vlasenko <vda.linux@googlemail.com> | 2008-03-20 13:13:09 +0000 |
commit | 0f3a580c4fec98bd4612dce4d77a9ac53a669fd3 (patch) | |
tree | 37fa1325f3792e0f37171f522c5f61cf6a6caa4a | |
parent | 027271e5a94591da535187fa95d481a1fdbcd9dc (diff) | |
download | busybox-w32-0f3a580c4fec98bd4612dce4d77a9ac53a669fd3.tar.gz busybox-w32-0f3a580c4fec98bd4612dce4d77a9ac53a669fd3.tar.bz2 busybox-w32-0f3a580c4fec98bd4612dce4d77a9ac53a669fd3.zip |
gcc compat fix and warning suppression
by Joe Krahn <krahn AT niehs.nih.gov>
-rw-r--r-- | findutils/find.c | 5 | ||||
-rw-r--r-- | include/platform.h | 3 |
2 files changed, 6 insertions, 2 deletions
diff --git a/findutils/find.c b/findutils/find.c index 634fbd189..f75bc9ef9 100644 --- a/findutils/find.c +++ b/findutils/find.c | |||
@@ -517,7 +517,10 @@ static action*** parse_params(char **argv) | |||
517 | unsigned cur_action = 0; | 517 | unsigned cur_action = 0; |
518 | USE_FEATURE_FIND_NOT( bool invert_flag = 0; ) | 518 | USE_FEATURE_FIND_NOT( bool invert_flag = 0; ) |
519 | 519 | ||
520 | /* 'static' doesn't work here! (gcc 4.1.2) */ | 520 | /* This is the only place in busybox where we use nested function. |
521 | * So far more standard alternatives were bigger. */ | ||
522 | /* Suppress a warning "func without a prototype" */ | ||
523 | auto action* alloc_action(int sizeof_struct, action_fp f); | ||
521 | action* alloc_action(int sizeof_struct, action_fp f) | 524 | action* alloc_action(int sizeof_struct, action_fp f) |
522 | { | 525 | { |
523 | action *ap; | 526 | action *ap; |
diff --git a/include/platform.h b/include/platform.h index bfe631506..51934853b 100644 --- a/include/platform.h +++ b/include/platform.h | |||
@@ -52,7 +52,8 @@ | |||
52 | # define ATTRIBUTE_NORETURN __attribute__ ((__noreturn__)) | 52 | # define ATTRIBUTE_NORETURN __attribute__ ((__noreturn__)) |
53 | # define ATTRIBUTE_PACKED __attribute__ ((__packed__)) | 53 | # define ATTRIBUTE_PACKED __attribute__ ((__packed__)) |
54 | # define ATTRIBUTE_ALIGNED(m) __attribute__ ((__aligned__(m))) | 54 | # define ATTRIBUTE_ALIGNED(m) __attribute__ ((__aligned__(m))) |
55 | # if __GNUC_PREREQ (3,0) | 55 | /* __NO_INLINE__: some gcc's do not honor inlining! :( */ |
56 | # if __GNUC_PREREQ (3,0) && !defined(__NO_INLINE__) | ||
56 | # define ALWAYS_INLINE __attribute__ ((always_inline)) inline | 57 | # define ALWAYS_INLINE __attribute__ ((always_inline)) inline |
57 | /* I've seen a toolchain where I needed __noinline__ instead of noinline */ | 58 | /* I've seen a toolchain where I needed __noinline__ instead of noinline */ |
58 | # define NOINLINE __attribute__((__noinline__)) | 59 | # define NOINLINE __attribute__((__noinline__)) |