Source-Changes-HG archive

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

[src/trunk]: src/dist/nvi/common make the previous patch compile.



details:   https://anonhg.NetBSD.org/src/rev/a0dc812a0980
branches:  trunk
changeset: 772925:a0dc812a0980
user:      christos <christos%NetBSD.org@localhost>
date:      Sat Jan 21 19:49:56 2012 +0000

description:
make the previous patch compile.

diffstat:

 dist/nvi/common/cut.c    |  5 +++--
 dist/nvi/common/delete.c |  4 ++--
 2 files changed, 5 insertions(+), 4 deletions(-)

diffs (44 lines):

diff -r fd8b53b8bd61 -r a0dc812a0980 dist/nvi/common/cut.c
--- a/dist/nvi/common/cut.c     Sat Jan 21 19:44:28 2012 +0000
+++ b/dist/nvi/common/cut.c     Sat Jan 21 19:49:56 2012 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: cut.c,v 1.6 2012/01/21 19:32:37 christos Exp $ */
+/*     $NetBSD: cut.c,v 1.7 2012/01/21 19:49:56 christos Exp $ */
 
 /*-
  * Copyright (c) 1992, 1993, 1994
@@ -134,7 +134,7 @@
        }
 
 
-#define        ENTIRE_LINE     -1
+#define        ENTIRE_LINE     (size_t)-1
        /* In line mode, it's pretty easy, just cut the lines. */
        if (LF_ISSET(CUT_LINEMODE)) {
                cbp->flags |= CB_LMODE;
@@ -257,6 +257,7 @@
         * copy the portion we want, and reset the TEXT length.
         */
        if (len != 0) {
+/*###260 [cc] error: comparison between signed and unsigned integer expressions%%%*/
                if (clen == ENTIRE_LINE)
                        clen = len - fcno;
                MEMCPYW(tp->lb, p + fcno, clen);
diff -r fd8b53b8bd61 -r a0dc812a0980 dist/nvi/common/delete.c
--- a/dist/nvi/common/delete.c  Sat Jan 21 19:44:28 2012 +0000
+++ b/dist/nvi/common/delete.c  Sat Jan 21 19:49:56 2012 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: delete.c,v 1.4 2012/01/21 19:35:02 christos Exp $ */
+/*     $NetBSD: delete.c,v 1.5 2012/01/21 19:49:56 christos Exp $ */
 
 /*-
  * Copyright (c) 1992, 1993, 1994
@@ -65,7 +65,7 @@
                if (tm->lno == lno) {
                        if (db_get(sp, lno, DBG_FATAL, &p, &len))
                                return (1);
-                       eof = tm->cno != -1 && tm->cno >= len ? 1 : 0;
+                       eof = tm->cno != (size_t)-1 && tm->cno >= len ? 1 : 0;
                } else
                        eof = 1;
                if (eof) {



Home | Main Index | Thread Index | Old Index