DORMANTno replies

[PATCH 2/3] xdiffi.c: squelch compiler warnings.

From: Junio C Hamano <hidden>
Date: 2016-06-15 22:42:30
Subsystem: the rest · Maintainer: Linus Torvalds

From: Marco Roeland <redacted>

This initializes a few variables that are judged to be used uninitialized
by the compiler.
---
 xdiffi.c |    5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)
diff --git a/xdiffi.c b/xdiffi.c
index b1297d4..b95ade2 100644
--- a/xdiffi.c
+++ b/xdiffi.c
@@ -220,7 +220,7 @@ static long xdl_split(unsigned long cons
 		if (ec >= xenv->mxcost) {
 			long fbest, fbest1, bbest, bbest1;
 
-			fbest = -1;
+			fbest = fbest1 = -1;
 			for (d = fmax; d >= fmin; d -= 2) {
 				i1 = XDL_MIN(kvdf[d], lim1);
 				i2 = i1 - d;
@@ -232,7 +232,7 @@ static long xdl_split(unsigned long cons
 				}
 			}
 
-			bbest = XDL_LINE_MAX;
+			bbest = bbest1 = XDL_LINE_MAX;
 			for (d = bmax; d >= bmin; d -= 2) {
 				i1 = XDL_MAX(off1, kvdb[d]);
 				i2 = i1 - d;
@@ -298,6 +298,7 @@ int xdl_recs_cmp(diffdata_t *dd1, long o
 	} else {
 		long ec;
 		xdpsplit_t spl;
+		spl.i1 = spl.i2 = 0;
 
 		/*
 		 * Divide ...
-- 
1.4.0.gbf9e
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help