Source-Changes-HG archive

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

[src/trunk]: src/external/bsd/nvi/dist/common Fix use of uninitialized variab...



details:   https://anonhg.NetBSD.org/src/rev/b65c10ec85f4
branches:  trunk
changeset: 357661:b65c10ec85f4
user:      rin <rin%NetBSD.org@localhost>
date:      Tue Nov 21 02:00:29 2017 +0000

description:
Fix use of uninitialized variable, found by clang.

diffstat:

 external/bsd/nvi/dist/common/conv.c |  6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diffs (27 lines):

diff -r 002150587da6 -r b65c10ec85f4 external/bsd/nvi/dist/common/conv.c
--- a/external/bsd/nvi/dist/common/conv.c       Tue Nov 21 00:47:38 2017 +0000
+++ b/external/bsd/nvi/dist/common/conv.c       Tue Nov 21 02:00:29 2017 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: conv.c,v 1.7 2017/11/13 04:21:55 rin Exp $ */
+/*     $NetBSD: conv.c,v 1.8 2017/11/21 02:00:29 rin Exp $ */
 /*-
  * Copyright (c) 1993, 1994
  *     The Regents of the University of California.  All rights reserved.
@@ -16,7 +16,7 @@
 static const char sccsid[] = "Id: conv.c,v 1.27 2001/08/18 21:41:41 skimo Exp  (Berkeley) Date: 2001/08/18 21:41:41 ";
 #endif /* not lint */
 #else
-__RCSID("$NetBSD: conv.c,v 1.7 2017/11/13 04:21:55 rin Exp $");
+__RCSID("$NetBSD: conv.c,v 1.8 2017/11/21 02:00:29 rin Exp $");
 #endif
 
 #include <sys/types.h>
@@ -242,7 +242,7 @@
 default_int2char(SCR *sp, const CHAR_T * str, ssize_t len, CONVWIN *cw, 
                size_t *tolen, const char **pdst, const char *enc)
 {
-    size_t i, j;
+    size_t i, j = 0;
     int offset = 0;
     char **tostr = (char **)(void *)&cw->bp1;
     size_t  *blen = &cw->blen1;



Home | Main Index | Thread Index | Old Index