From c88850db6f3a4374e7627417acde100d7210630f Mon Sep 17 00:00:00 2001 From: Karl Williamson Date: Thu, 29 May 2014 18:43:21 -0600 Subject: utf8.c: Silence compiler warning This was brought to my attention by Jarkko Hietaniemi. The compiler was complaining that a variable could be used uninitialized. In practice this doesn't happen, as it would only happen on bad data, and Perl itself generates the data used. (I suppose if the data got corrupted, it could happen.) This commit initializes the value unconditionally, which allows a conditional setting of it to be removed. --- utf8.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'utf8.c') diff --git a/utf8.c b/utf8.c index 36ee7378df..3ed4f3ae19 100644 --- a/utf8.c +++ b/utf8.c @@ -2997,6 +2997,7 @@ S_swash_scan_list_line(pTHX_ U8* l, U8* const lend, UV* min, UV* max, UV* val, /* Get the first number on the line: the range minimum */ numlen = lend - l; *min = grok_hex((char *)l, &numlen, &flags, NULL); + *max = *min; /* So can never return without setting max */ if (numlen) /* If found a hex number, position past it */ l += numlen; else if (nl) { /* Else, go handle next line, if any */ @@ -3048,7 +3049,6 @@ S_swash_scan_list_line(pTHX_ U8* l, U8* const lend, UV* min, UV* max, UV* val, } else { /* Nothing following range min, should be single element with no mapping expected */ - *max = *min; if (wants_value) { *val = 0; if (typeto) { -- cgit v1.2.1