Git development
 help / color / mirror / Atom feed
* [PATCH 2/3] xdiffi.c: squelch compiler warnings.
@ 2006-06-22 18:58 Junio C Hamano
  0 siblings, 0 replies; only message in thread
From: Junio C Hamano @ 2006-06-22 18:58 UTC (permalink / raw)
  To: Davide Libenzi; +Cc: git, Marco Roeland

From: Marco Roeland <marco.roeland@xs4all.nl>

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

^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2006-06-22 18:58 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-06-22 18:58 [PATCH 2/3] xdiffi.c: squelch compiler warnings Junio C Hamano

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox