summaryrefslogtreecommitdiff
path: root/toke.c
diff options
context:
space:
mode:
authorKarl Williamson <public@khwilliamson.com>2013-01-06 21:51:12 -0700
committerKarl Williamson <public@khwilliamson.com>2013-01-06 22:04:05 -0700
commitc3320c2ab34e48530026fdab236b8a7176d022e5 (patch)
treecaae4aae2afefb63e3062f84627d1e3eb87b019b /toke.c
parenta34060b8ba3983da646f31bf07ece5c8f17eb075 (diff)
downloadperl-c3320c2ab34e48530026fdab236b8a7176d022e5.tar.gz
toke.c: Silence compiler uninitialized warning
I believe that there really is not a path through this that yields an uninitialized value for this variable, but initialize it to UV_MAX in case there is, that value will hopefully stand out more than '0' would.
Diffstat (limited to 'toke.c')
-rw-r--r--toke.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/toke.c b/toke.c
index a42722df70..419768c24a 100644
--- a/toke.c
+++ b/toke.c
@@ -2963,7 +2963,8 @@ S_scan_const(pTHX_ char *start)
* far, plus the length the current construct will occupy, plus room for
* the trailing NUL, plus one byte for every input byte still unscanned */
- UV uv;
+ UV uv = UV_MAX; /* Initialize to weird value to try to catch any uses
+ before set */
#ifdef EBCDIC
UV literal_endpoint = 0;
bool native_range = TRUE; /* turned to FALSE if the first endpoint is Unicode. */