]> granicus.if.org Git - php/commitdiff
Initialize calendar_long variable
authorNikita Popov <nikita.ppv@gmail.com>
Wed, 14 Oct 2020 09:57:05 +0000 (11:57 +0200)
committerNikita Popov <nikita.ppv@gmail.com>
Wed, 14 Oct 2020 09:57:05 +0000 (11:57 +0200)
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...

ext/intl/dateformat/dateformat_create.cpp

index 43e113fab1cf868b5fb1fcfe7acda183206c05b7..e80b5d0131509ae5ef34b59ee326736d70d381ae 100644 (file)
@@ -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;