Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/bin/ksh make this build with -Werror



details:   https://anonhg.NetBSD.org/src/rev/aa1fe7a97388
branches:  trunk
changeset: 477545:aa1fe7a97388
user:      hubertf <hubertf%NetBSD.org@localhost>
date:      Wed Oct 20 15:49:15 1999 +0000

description:
make this build with -Werror

diffstat:

 bin/ksh/emacs.c |   3 ++-
 bin/ksh/expr.c  |   4 +---
 bin/ksh/lex.c   |  10 ++++++----
 3 files changed, 9 insertions(+), 8 deletions(-)

diffs (61 lines):

diff -r 7b339ac503f6 -r aa1fe7a97388 bin/ksh/emacs.c
--- a/bin/ksh/emacs.c   Wed Oct 20 15:26:41 1999 +0000
+++ b/bin/ksh/emacs.c   Wed Oct 20 15:49:15 1999 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: emacs.c,v 1.6 1999/10/20 15:09:59 hubertf Exp $        */
+/*     $NetBSD: emacs.c,v 1.7 1999/10/20 15:49:15 hubertf Exp $        */
 
 /*
  *  Emacs-like command line editing and history
@@ -144,6 +144,7 @@
 static char    *x_lastcp ARGS((void));
 static void    do_complete ARGS((int flags, Comp_type type));
 static int     x_do_ins    ARGS((const char *, int));
+static void    bind_if_not_bound ARGS((int, int, int));
 
 
 /* The lines between START-FUNC-TAB .. END-FUNC-TAB are run through a
diff -r 7b339ac503f6 -r aa1fe7a97388 bin/ksh/expr.c
--- a/bin/ksh/expr.c    Wed Oct 20 15:26:41 1999 +0000
+++ b/bin/ksh/expr.c    Wed Oct 20 15:49:15 1999 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: expr.c,v 1.3 1999/10/20 15:09:59 hubertf Exp $ */
+/*     $NetBSD: expr.c,v 1.4 1999/10/20 15:49:15 hubertf Exp $ */
 
 /*
  * Korn expression evaluation
@@ -128,8 +128,6 @@
 enum error_type { ET_UNEXPECTED, ET_BADLIT, ET_RECURSIVE,
                  ET_LVALUE, ET_RDONLY, ET_STR };
 
-static Expr_state *es;
-
 static void        evalerr  ARGS((Expr_state *es, enum error_type type,
                                  const char *str)) GCC_FUNC_ATTR(noreturn);
 static struct tbl *evalexpr ARGS((Expr_state *es, enum prec prec));
diff -r 7b339ac503f6 -r aa1fe7a97388 bin/ksh/lex.c
--- a/bin/ksh/lex.c     Wed Oct 20 15:26:41 1999 +0000
+++ b/bin/ksh/lex.c     Wed Oct 20 15:49:15 1999 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: lex.c,v 1.6 1999/10/20 15:09:59 hubertf Exp $  */
+/*     $NetBSD: lex.c,v 1.7 1999/10/20 15:49:15 hubertf Exp $  */
 
 /*
  * lexical analysis and source input
@@ -647,11 +647,13 @@
                if (c == c2 || (c == '<' && c2 == '>')) {
                        iop->flag = c == c2 ?
                                  (c == '>' ? IOCAT : IOHERE) : IORDWR;
-                       if (iop->flag == IOHERE)
-                               if ((c2 = getsc()) == '-')
+                       if (iop->flag == IOHERE) {
+                               if ((c2 = getsc()) == '-') {
                                        iop->flag |= IOSKIP;
-                               else
+                               } else {
                                        ungetsc(c2);
+                               }
+                       }
                } else if (c2 == '&')
                        iop->flag = IODUP | (c == '<' ? IORDUP : 0);
                else {



Home | Main Index | Thread Index | Old Index