aboutsummaryrefslogtreecommitdiff
path: root/shell/ash.c
diff options
context:
space:
mode:
authorEric Andersen <andersen@codepoet.org>2006-01-30 22:48:39 +0000
committerEric Andersen <andersen@codepoet.org>2006-01-30 22:48:39 +0000
commita68ea1cb93c29125bc4f30ddd415fca02249e010 (patch)
tree5741be315758b807145c24da9ff3a1dbf8fce4e8 /shell/ash.c
parent9a58b02ec75caafb7214f1ad0317f9a4830cbd2a (diff)
downloadbusybox-w32-a68ea1cb93c29125bc4f30ddd415fca02249e010.tar.gz
busybox-w32-a68ea1cb93c29125bc4f30ddd415fca02249e010.tar.bz2
busybox-w32-a68ea1cb93c29125bc4f30ddd415fca02249e010.zip
fix up yet more annoying signed/unsigned and mixed type errors
Diffstat (limited to 'shell/ash.c')
-rw-r--r--shell/ash.c26
1 files changed, 14 insertions, 12 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
1404typedef int64_t arith_t; 1404typedef int64_t arith_t;
1405#define arith_t_type (long long)
1405#else 1406#else
1406typedef long arith_t; 1407typedef 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-- */