From bd6bbecf8a9e280ed8ba1f0239ba2e53a1799e06 Mon Sep 17 00:00:00 2001 From: rin Date: Tue, 21 Nov 2017 02:00:29 +0000 Subject: [PATCH] Fix use of uninitialized variable, found by clang. --- external/bsd/nvi/dist/common/conv.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/external/bsd/nvi/dist/common/conv.c b/external/bsd/nvi/dist/common/conv.c index ee53edd6837a..11612daf6e06 100644 --- a/external/bsd/nvi/dist/common/conv.c +++ b/external/bsd/nvi/dist/common/conv.c @@ -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 @@ -242,7 +242,7 @@ static int 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;