Skip to content

Commit d5979c8

Browse files
committed
Reduce (some more) compile noise of 'unused variable' and 'may be used
uninitialized' warnings.
1 parent 4ee1ec4 commit d5979c8

File tree

4 files changed

+4
-6
lines changed

4 files changed

+4
-6
lines changed

ext/curl/interface.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -2441,7 +2441,7 @@ static int _php_curl_setopt(php_curl *ch, long option, zval **zvalue, zval *retu
24412441

24422442
ph = HASH_OF(*zvalue);
24432443
if (!ph) {
2444-
char *name;
2444+
char *name = NULL;
24452445
switch (option) {
24462446
case CURLOPT_HTTPHEADER:
24472447
name = "CURLOPT_HTTPHEADER";

ext/intl/calendar/calendar_methods.cpp

-1
Original file line numberDiff line numberDiff line change
@@ -184,7 +184,6 @@ U_CFUNC PHP_FUNCTION(intlcal_get_keyword_values_for_locale)
184184

185185
U_CFUNC PHP_FUNCTION(intlcal_get_now)
186186
{
187-
UErrorCode status = U_ZERO_ERROR;
188187
intl_error_reset(NULL TSRMLS_CC);
189188

190189
if (zend_parse_parameters_none() == FAILURE) {

ext/intl/calendar/gregoriancalendar_methods.cpp

+1-2
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,6 @@ static inline GregorianCalendar *fetch_greg(Calendar_object *co) {
3838

3939
static void _php_intlgregcal_constructor_body(INTERNAL_FUNCTION_PARAMETERS)
4040
{
41-
zval *object = getThis();
4241
zval **tz_object = NULL;
4342
zval **args_a[6] = {0},
4443
***args = &args_a[0];
@@ -84,7 +83,7 @@ static void _php_intlgregcal_constructor_body(INTERNAL_FUNCTION_PARAMETERS)
8483
}
8584

8685
// instantion of ICU object
87-
GregorianCalendar *gcal;
86+
GregorianCalendar *gcal = NULL;
8887

8988
if (variant <= 2) {
9089
// From timezone and locale (0 to 2 arguments)

ext/intl/msgformat/msgformat_helpers.cpp

+2-2
Original file line numberDiff line numberDiff line change
@@ -487,7 +487,7 @@ U_CFUNC void umsg_format_helper(MessageFormatter_object *mfo,
487487
}
488488
case Formattable::kLong:
489489
{
490-
int32_t tInt32;
490+
int32_t tInt32 = 0;
491491
retry_klong:
492492
if (Z_TYPE_PP(elem) == IS_DOUBLE) {
493493
if (Z_DVAL_PP(elem) > (double)INT32_MAX ||
@@ -517,7 +517,7 @@ U_CFUNC void umsg_format_helper(MessageFormatter_object *mfo,
517517
}
518518
case Formattable::kInt64:
519519
{
520-
int64_t tInt64;
520+
int64_t tInt64 = 0;
521521
retry_kint64:
522522
if (Z_TYPE_PP(elem) == IS_DOUBLE) {
523523
if (Z_DVAL_PP(elem) > (double)U_INT64_MAX ||

0 commit comments

Comments
 (0)