diff options
author | andersen <andersen@69ca8d6d-28ef-0310-b511-8ec308f3f277> | 2006-01-30 22:48:39 +0000 |
---|---|---|
committer | andersen <andersen@69ca8d6d-28ef-0310-b511-8ec308f3f277> | 2006-01-30 22:48:39 +0000 |
commit | 45d22dce9fb986e738313cd9f1f246255db097e8 (patch) | |
tree | 5741be315758b807145c24da9ff3a1dbf8fce4e8 /shell | |
parent | 6ef925c28235f73e3a054a61717ea40fcd4ffd98 (diff) | |
download | busybox-w32-45d22dce9fb986e738313cd9f1f246255db097e8.tar.gz busybox-w32-45d22dce9fb986e738313cd9f1f246255db097e8.tar.bz2 busybox-w32-45d22dce9fb986e738313cd9f1f246255db097e8.zip |
fix up yet more annoying signed/unsigned and mixed type errors
git-svn-id: svn://busybox.net/trunk/busybox@13732 69ca8d6d-28ef-0310-b511-8ec308f3f277
Diffstat (limited to 'shell')
-rw-r--r-- | shell/ash.c | 26 | ||||
-rw-r--r-- | shell/hush.c | 6 | ||||
-rw-r--r-- | shell/lash.c | 2 | ||||
-rw-r--r-- | shell/msh.c | 2 |
4 files changed, 19 insertions, 17 deletions
diff --git a/shell/ash.c b/shell/ash.c index 3564d850b..e9e6def22 100644 --- a/shell/ash.c +++ b/shell/ash.c | |||
@@ -1402,8 +1402,10 @@ static void unsetfunc(const char *); | |||
1402 | 1402 | ||
1403 | #ifdef CONFIG_ASH_MATH_SUPPORT_64 | 1403 | #ifdef CONFIG_ASH_MATH_SUPPORT_64 |
1404 | typedef int64_t arith_t; | 1404 | typedef int64_t arith_t; |
1405 | #define arith_t_type (long long) | ||
1405 | #else | 1406 | #else |
1406 | typedef long arith_t; | 1407 | typedef long arith_t; |
1408 | #define arith_t_type (long) | ||
1407 | #endif | 1409 | #endif |
1408 | 1410 | ||
1409 | #ifdef CONFIG_ASH_MATH_SUPPORT | 1411 | #ifdef CONFIG_ASH_MATH_SUPPORT |
@@ -10132,15 +10134,15 @@ readtoken1(int firstc, int syntax, char *eofmark, int striptabs) | |||
10132 | char *out; | 10134 | char *out; |
10133 | int len; | 10135 | int len; |
10134 | char line[EOFMARKLEN + 1]; | 10136 | char line[EOFMARKLEN + 1]; |
10135 | struct nodelist *bqlist; | 10137 | struct nodelist *bqlist = 0; |
10136 | int quotef; | 10138 | int quotef = 0; |
10137 | int dblquote; | 10139 | int dblquote = 0; |
10138 | int varnest; /* levels of variables expansion */ | 10140 | int varnest = 0; /* levels of variables expansion */ |
10139 | int arinest; /* levels of arithmetic expansion */ | 10141 | int arinest = 0; /* levels of arithmetic expansion */ |
10140 | int parenlevel; /* levels of parens in arithmetic */ | 10142 | int parenlevel = 0; /* levels of parens in arithmetic */ |
10141 | int dqvarnest; /* levels of variables expansion within double quotes */ | 10143 | int dqvarnest = 0; /* levels of variables expansion within double quotes */ |
10142 | int oldstyle; | 10144 | int oldstyle = 0; |
10143 | int prevsyntax; /* syntax before arithmetic */ | 10145 | int prevsyntax = 0; /* syntax before arithmetic */ |
10144 | #if __GNUC__ | 10146 | #if __GNUC__ |
10145 | /* Avoid longjmp clobbering */ | 10147 | /* Avoid longjmp clobbering */ |
10146 | (void) &out; | 10148 | (void) &out; |
@@ -10563,7 +10565,7 @@ parsebackq: { | |||
10563 | struct jmploc jmploc; | 10565 | struct jmploc jmploc; |
10564 | struct jmploc *volatile savehandler; | 10566 | struct jmploc *volatile savehandler; |
10565 | size_t savelen; | 10567 | size_t savelen; |
10566 | int saveprompt; | 10568 | int saveprompt = 0; |
10567 | #ifdef __GNUC__ | 10569 | #ifdef __GNUC__ |
10568 | (void) &saveprompt; | 10570 | (void) &saveprompt; |
10569 | #endif | 10571 | #endif |
@@ -13380,9 +13382,9 @@ arith_apply(operator op, v_n_t *numstack, v_n_t **numstackptr) | |||
13380 | } | 13382 | } |
13381 | /* save to shell variable */ | 13383 | /* save to shell variable */ |
13382 | #ifdef CONFIG_ASH_MATH_SUPPORT_64 | 13384 | #ifdef CONFIG_ASH_MATH_SUPPORT_64 |
13383 | snprintf(buf, sizeof(buf), "%lld", rez); | 13385 | snprintf(buf, sizeof(buf), "%lld", arith_t_type rez); |
13384 | #else | 13386 | #else |
13385 | snprintf(buf, sizeof(buf), "%ld", rez); | 13387 | snprintf(buf, sizeof(buf), "%ld", arith_t_type rez); |
13386 | #endif | 13388 | #endif |
13387 | setvar(numptr_m1->var, buf, 0); | 13389 | setvar(numptr_m1->var, buf, 0); |
13388 | /* after saving, make previous value for v++ or v-- */ | 13390 | /* after saving, make previous value for v++ or v-- */ |
diff --git a/shell/hush.c b/shell/hush.c index ff29974b6..096b40251 100644 --- a/shell/hush.c +++ b/shell/hush.c | |||
@@ -2614,10 +2614,10 @@ int parse_stream(o_string *dest, struct p_context *ctx, | |||
2614 | return 0; | 2614 | return 0; |
2615 | } | 2615 | } |
2616 | 2616 | ||
2617 | static void mapset(const unsigned char *set, int code) | 2617 | static void mapset(const char *set, int code) |
2618 | { | 2618 | { |
2619 | const unsigned char *s; | 2619 | const char *s; |
2620 | for (s=set; *s; s++) map[*s] = code; | 2620 | for (s=set; *s; s++) map[(int)*s] = code; |
2621 | } | 2621 | } |
2622 | 2622 | ||
2623 | static void update_ifs_map(void) | 2623 | static void update_ifs_map(void) |
diff --git a/shell/lash.c b/shell/lash.c index 56a3a23dd..1b8aca506 100644 --- a/shell/lash.c +++ b/shell/lash.c | |||
@@ -1440,7 +1440,7 @@ static int busy_loop(FILE * input) | |||
1440 | char *next_command = NULL; | 1440 | char *next_command = NULL; |
1441 | struct job newjob; | 1441 | struct job newjob; |
1442 | int i; | 1442 | int i; |
1443 | int inbg; | 1443 | int inbg = 0; |
1444 | int status; | 1444 | int status; |
1445 | #ifdef CONFIG_LASH_JOB_CONTROL | 1445 | #ifdef CONFIG_LASH_JOB_CONTROL |
1446 | pid_t parent_pgrp; | 1446 | pid_t parent_pgrp; |
diff --git a/shell/msh.c b/shell/msh.c index 08ca792fa..d56db5714 100644 --- a/shell/msh.c +++ b/shell/msh.c | |||
@@ -1622,7 +1622,7 @@ static void initarea() | |||
1622 | brkaddr = malloc(AREASIZE); | 1622 | brkaddr = malloc(AREASIZE); |
1623 | brktop = brkaddr + AREASIZE; | 1623 | brktop = brkaddr + AREASIZE; |
1624 | 1624 | ||
1625 | while ((int) sbrk(0) & ALIGN) | 1625 | while ((long) sbrk(0) & ALIGN) |
1626 | sbrk(1); | 1626 | sbrk(1); |
1627 | areabot = (struct region *) sbrk(REGSIZE); | 1627 | areabot = (struct region *) sbrk(REGSIZE); |
1628 | 1628 | ||