@ -470,6 +470,7 @@ static void diff_words_show(struct diff_words_data *diff_words)
@@ -470,6 +470,7 @@ static void diff_words_show(struct diff_words_data *diff_words)
mmfile_t minus, plus;
int i;
memset(&xpp, 0, sizeof(xpp));
memset(&xecfg, 0, sizeof(xecfg));
minus.size = diff_words->minus.text.size;
minus.ptr = xmalloc(minus.size);
@ -1585,6 +1586,7 @@ static void builtin_diff(const char *name_a,
@@ -1585,6 +1586,7 @@ static void builtin_diff(const char *name_a,
if (!pe)
pe = diff_funcname_pattern(two);
memset(&xpp, 0, sizeof(xpp));
memset(&xecfg, 0, sizeof(xecfg));
memset(&ecbdata, 0, sizeof(ecbdata));
ecbdata.label_path = lbl;
@ -1658,6 +1660,7 @@ static void builtin_diffstat(const char *name_a, const char *name_b,
@@ -1658,6 +1660,7 @@ static void builtin_diffstat(const char *name_a, const char *name_b,
xdemitconf_t xecfg;
xdemitcb_t ecb;
memset(&xpp, 0, sizeof(xpp));
memset(&xecfg, 0, sizeof(xecfg));
xpp.flags = XDF_NEED_MINIMAL | o->xdl_opts;
xdi_diff_outf(&mf1, &mf2, diffstat_consume, diffstat,
@ -1704,6 +1707,7 @@ static void builtin_checkdiff(const char *name_a, const char *name_b,
@@ -1704,6 +1707,7 @@ static void builtin_checkdiff(const char *name_a, const char *name_b,
xdemitconf_t xecfg;
xdemitcb_t ecb;
memset(&xpp, 0, sizeof(xpp));
memset(&xecfg, 0, sizeof(xecfg));
xecfg.ctxlen = 1; /* at least one context line */
xpp.flags = XDF_NEED_MINIMAL;
@ -3149,6 +3153,7 @@ static int diff_get_patch_id(struct diff_options *options, unsigned char *sha1)
@@ -3149,6 +3153,7 @@ static int diff_get_patch_id(struct diff_options *options, unsigned char *sha1)
struct diff_filepair *p = q->queue[i];
int len1, len2;
memset(&xpp, 0, sizeof(xpp));
memset(&xecfg, 0, sizeof(xecfg));
if (p->status == 0)
return error("internal diff status error");