From: Nikita Popov Date: Wed, 14 Oct 2020 09:57:05 +0000 (+0200) Subject: Initialize calendar_long variable X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=5e34744fd99a4d72a8d05de59d5bcc3d7d47d5b1;p=php 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... --- 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;