diff options
author | David Mitchell <davem@iabyn.com> | 2020-12-03 10:36:42 +0000 |
---|---|---|
committer | David Mitchell <davem@iabyn.com> | 2020-12-03 10:36:42 +0000 |
commit | 153764ac87c44440fea60466e8f718671117bac2 (patch) | |
tree | 12bf481a9ff006ac078840c4b2dd237f521bd4e6 /time64.c | |
parent | 7de4500e1bc038d5be4ef2683c4bfab617a58a9b (diff) | |
download | perl-153764ac87c44440fea60466e8f718671117bac2.tar.gz |
time64.c: avoid 'uninit' compiler warning
clang isn't smart enough to recognise the pattern:
if (foo) { ...} { else orig_year = ... }
...
if (!foo) { ... use orig_year .. }
So just unconditionally initialise orig_year.
Diffstat (limited to 'time64.c')
-rw-r--r-- | time64.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -479,7 +479,7 @@ struct TM *Perl_localtime64_r (const Time64_T *time, struct TM *local_tm) struct tm safe_date; const struct tm * result; struct TM gm_tm; - Year orig_year; + Year orig_year = 0; /* initialise to avoid spurious compiler warning */ int month_diff; const bool use_system = SHOULD_USE_SYSTEM_LOCALTIME(*time); dTHX; |