From: NeilBrown Date: Tue, 27 Aug 2013 23:38:33 +0000 (+1000) Subject: vpatch: avoid warning from gcc-4.4.6 X-Git-Tag: v1.1~10 X-Git-Url: http://git.neil.brown.name/?a=commitdiff_plain;h=e8c9fd2f21078b8a32ae5f4bbb66359593072a35;p=wiggle.git vpatch: avoid warning from gcc-4.4.6 It seems that gcc-4.4.6 doesn't like struct plist p = {0}; as it don't initialise all fields. I only added that to make sure 'outfile' was initialised, so just do that explicitly. Reported-by: Stephen Cameron @ G+ Signed-off-by: NeilBrown --- diff --git a/vpatch.c b/vpatch.c index 2ec31d5..80b94a3 100644 --- a/vpatch.c +++ b/vpatch.c @@ -2350,8 +2350,7 @@ static int show_merge(char *origname, FILE *patch, int reverse, struct plist p = {0}; p.file = origname; - if (replace) - p.outfile = outfile; + p.outfile = replace ? outfile : NULL; if (patch) { p.start = 0; fseek(patch, 0, SEEK_END);