summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNikita Popov <nikita.ppv@gmail.com>2020-10-14 11:57:05 +0200
committerNikita Popov <nikita.ppv@gmail.com>2020-10-14 11:57:05 +0200
commit5e34744fd99a4d72a8d05de59d5bcc3d7d47d5b1 (patch)
treea413a0253d8df136bae64750cfc88e832c6a2b03
parent251af7329f38f8a78340d6150a3bf584ff8c6b88 (diff)
downloadphp-git-5e34744fd99a4d72a8d05de59d5bcc3d7d47d5b1.tar.gz
Initialize calendar_long variable
As reported by cmb, this results a VC runtime warning. I don't believe there's a problem here, as we only use calendar_long if both calendar_is_null and calendar_obj are not set, but it doesn't hurt to initialize it either...
-rw-r--r--ext/intl/dateformat/dateformat_create.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/ext/intl/dateformat/dateformat_create.cpp b/ext/intl/dateformat/dateformat_create.cpp
index 43e113fab1..e80b5d0131 100644
--- a/ext/intl/dateformat/dateformat_create.cpp
+++ b/ext/intl/dateformat/dateformat_create.cpp
@@ -54,7 +54,7 @@ static zend_result datefmt_ctor(INTERNAL_FUNCTION_PARAMETERS)
zend_long date_type = 0;
zend_long time_type = 0;
zend_object *calendar_obj = NULL;
- zend_long calendar_long;
+ zend_long calendar_long = 0;
zend_bool calendar_is_null = 1;
Calendar *cal = NULL;
zend_long calendar_type;