diff options
author | Denys Vlasenko <vda.linux@googlemail.com> | 2019-06-08 12:39:30 +0200 |
---|---|---|
committer | Denys Vlasenko <vda.linux@googlemail.com> | 2019-06-08 12:39:30 +0200 |
commit | 7a4e55422a3143eee48660a1f620646a88988147 (patch) | |
tree | a5ec67e8d31d9e2b9fed5d1f3e6bac501461c776 | |
parent | 3e463e1cfd8d6c42b4ee866723f84ca8adb32da7 (diff) | |
download | busybox-w32-7a4e55422a3143eee48660a1f620646a88988147.tar.gz busybox-w32-7a4e55422a3143eee48660a1f620646a88988147.tar.bz2 busybox-w32-7a4e55422a3143eee48660a1f620646a88988147.zip |
bc: placate compiler warnings
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
-rw-r--r-- | miscutils/bc.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/miscutils/bc.c b/miscutils/bc.c index 36e978ed8..aba51e5f8 100644 --- a/miscutils/bc.c +++ b/miscutils/bc.c | |||
@@ -997,10 +997,12 @@ static ERRORFUNC int bc_error_bad_character(char c) | |||
997 | IF_ERROR_RETURN_POSSIBLE(return) bc_error("NUL character"); | 997 | IF_ERROR_RETURN_POSSIBLE(return) bc_error("NUL character"); |
998 | IF_ERROR_RETURN_POSSIBLE(return) bc_error_fmt("bad character '%c'", c); | 998 | IF_ERROR_RETURN_POSSIBLE(return) bc_error_fmt("bad character '%c'", c); |
999 | } | 999 | } |
1000 | #if ENABLE_BC | ||
1000 | static ERRORFUNC int bc_error_bad_function_definition(void) | 1001 | static ERRORFUNC int bc_error_bad_function_definition(void) |
1001 | { | 1002 | { |
1002 | IF_ERROR_RETURN_POSSIBLE(return) bc_error_at("bad function definition"); | 1003 | IF_ERROR_RETURN_POSSIBLE(return) bc_error_at("bad function definition"); |
1003 | } | 1004 | } |
1005 | #endif | ||
1004 | static ERRORFUNC int bc_error_bad_expression(void) | 1006 | static ERRORFUNC int bc_error_bad_expression(void) |
1005 | { | 1007 | { |
1006 | IF_ERROR_RETURN_POSSIBLE(return) bc_error_at("bad expression"); | 1008 | IF_ERROR_RETURN_POSSIBLE(return) bc_error_at("bad expression"); |
@@ -1273,14 +1275,12 @@ static int bc_map_insert(BcVec *v, const void *ptr, size_t *i) | |||
1273 | return 1; // "was inserted" | 1275 | return 1; // "was inserted" |
1274 | } | 1276 | } |
1275 | 1277 | ||
1276 | #if ENABLE_BC | ||
1277 | static size_t bc_map_find_exact(const BcVec *v, const void *ptr) | 1278 | static size_t bc_map_find_exact(const BcVec *v, const void *ptr) |
1278 | { | 1279 | { |
1279 | size_t i = bc_map_find_ge(v, ptr); | 1280 | size_t i = bc_map_find_ge(v, ptr); |
1280 | if (i >= v->len) return BC_VEC_INVALID_IDX; | 1281 | if (i >= v->len) return BC_VEC_INVALID_IDX; |
1281 | return bc_id_cmp(ptr, bc_vec_item(v, i)) ? BC_VEC_INVALID_IDX : i; | 1282 | return bc_id_cmp(ptr, bc_vec_item(v, i)) ? BC_VEC_INVALID_IDX : i; |
1282 | } | 1283 | } |
1283 | #endif | ||
1284 | 1284 | ||
1285 | static void bc_num_setToZero(BcNum *n, size_t scale) | 1285 | static void bc_num_setToZero(BcNum *n, size_t scale) |
1286 | { | 1286 | { |