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

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

 



From: Marco Roeland <marco.roeland@xxxxxxxxx>

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


-
: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]