diff options
author | Karl Williamson <khw@cpan.org> | 2014-05-29 18:43:21 -0600 |
---|---|---|
committer | Karl Williamson <khw@cpan.org> | 2014-05-29 18:58:20 -0600 |
commit | c88850db6f3a4374e7627417acde100d7210630f (patch) | |
tree | 907317c8938a890478af7b549009c6314619e794 /utf8.c | |
parent | 95543e9208cb60d9c1262366d8d13fc240fb3ce1 (diff) | |
download | perl-c88850db6f3a4374e7627417acde100d7210630f.tar.gz |
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.
Diffstat (limited to 'utf8.c')
-rw-r--r-- | utf8.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -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) { |