From 321c551969cc862a859c9e79c8404af90c94e81d Mon Sep 17 00:00:00 2001 From: imp Date: Sun, 25 Apr 1999 21:13:34 +0000 Subject: First set of fixes to keep egcs happy. These include {} around single statement if blocks[*] when the else could be ambiguous, not defaulting to int type and removal of some unused variables. [*] This is explicitly allowed by style(9) when the single statement spans more than one line. Reviewed by: obrien, chuckr --- bin/csh/dol.c | 5 +++-- bin/csh/func.c | 5 +++-- bin/csh/lex.c | 4 ++-- bin/csh/sem.c | 5 +++-- 4 files changed, 11 insertions(+), 8 deletions(-) (limited to 'bin/csh') diff --git a/bin/csh/dol.c b/bin/csh/dol.c index 21d6487..79a5349 100644 --- a/bin/csh/dol.c +++ b/bin/csh/dol.c @@ -36,7 +36,7 @@ static char sccsid[] = "@(#)dol.c 8.1 (Berkeley) 5/31/93"; #else static const char rcsid[] = - "$Id: dol.c,v 1.7 1998/05/06 06:50:39 charnier Exp $"; + "$Id: dol.c,v 1.8 1998/05/13 07:28:52 charnier Exp $"; #endif #endif /* not lint */ @@ -605,11 +605,12 @@ Dgetdol() stderror(ERR_SYNTAX); } else { - if (subscr > 0) + if (subscr > 0) { if (subscr > upb) lwb = 1, upb = 0; else lwb = upb = subscr; + } unDredc(c); } if (dimen) { diff --git a/bin/csh/func.c b/bin/csh/func.c index 1b8da96..f5cbe52 100644 --- a/bin/csh/func.c +++ b/bin/csh/func.c @@ -36,7 +36,7 @@ static char sccsid[] = "@(#)func.c 8.1 (Berkeley) 5/31/93"; #else static const char rcsid[] = - "$Id: func.c,v 1.10 1998/02/28 10:49:56 jraynard Exp $"; + "$Id: func.c,v 1.11 1998/07/27 21:15:52 nectar Exp $"; #endif #endif /* not lint */ @@ -754,11 +754,12 @@ getword(wp) c = readc(1); if (c == '\\' && (c = readc(1)) == '\n') c = ' '; - if (c == '\'' || c == '"') + if (c == '\'' || c == '"') { if (d == 0) d = c; else if (d == c) d = 0; + } if (c < 0) goto past; if (wp) { diff --git a/bin/csh/lex.c b/bin/csh/lex.c index 3ec0425..56acc41 100644 --- a/bin/csh/lex.c +++ b/bin/csh/lex.c @@ -36,7 +36,7 @@ static char sccsid[] = "@(#)lex.c 8.1 (Berkeley) 5/31/93"; #else static const char rcsid[] = - "$Id: lex.c,v 1.9 1998/05/06 06:50:52 charnier Exp $"; + "$Id: lex.c,v 1.10 1998/05/13 07:29:05 charnier Exp $"; #endif #endif /* not lint */ @@ -1328,7 +1328,7 @@ readc(wanteof) bool wanteof; { int c; - static sincereal; + static int sincereal; aret = F_SEEK; if ((c = peekread) != '\0') { diff --git a/bin/csh/sem.c b/bin/csh/sem.c index 753b839..f9fedda 100644 --- a/bin/csh/sem.c +++ b/bin/csh/sem.c @@ -36,7 +36,7 @@ static char sccsid[] = "@(#)sem.c 8.1 (Berkeley) 5/31/93"; #else static const char rcsid[] = - "$Id: sem.c,v 1.7 1998/02/28 10:50:00 jraynard Exp $"; + "$Id: sem.c,v 1.8 1998/05/06 06:51:00 charnier Exp $"; #endif #endif /* not lint */ @@ -203,7 +203,7 @@ execute(t, wanttty, pipein, pipeout) * We have to fork for eval too. */ (bifunc && (t->t_dflg & (F_PIPEIN | F_PIPEOUT)) != 0 && - bifunc->bfunct == doeval)) + bifunc->bfunct == doeval)) { if (t->t_dtyp == NODE_PAREN || t->t_dflg & (F_REPEAT | F_AMPERSAND) || bifunc) { forked++; @@ -339,6 +339,7 @@ execute(t, wanttty, pipein, pipeout) } } + } if (pid != 0) { /* * It would be better if we could wait for the whole job when we -- cgit v1.1