Skip to content

Commit 1c53a4d

Browse files
committed
build fixes
1 parent f6600bd commit 1c53a4d

File tree

4 files changed

+13
-7
lines changed

4 files changed

+13
-7
lines changed

ext/bcmath/bcmath.c

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1183,8 +1183,14 @@ static zend_result bcmath_number_parse_num(const zval *zv, zend_object **obj, ze
11831183
*lval = 0;
11841184
return FAILURE;
11851185

1186-
default:
1187-
return zend_parse_arg_long_slow(zv, lval, 1 /* dummy */) ? SUCCESS : FAILURE;
1186+
default: {
1187+
zend_opt_long result = zend_parse_arg_long_slow(zv, 1 /* dummy */);
1188+
if (result.has_value) {
1189+
*lval = result.value;
1190+
return SUCCESS;
1191+
}
1192+
return FAILURE;
1193+
}
11881194
}
11891195
}
11901196
}

ext/gmp/gmp.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -137,15 +137,15 @@ static bool gmp_zend_parse_arg_into_mpz_ex(
137137
* but operator overloading with objects should behave as if a
138138
* method was called, thus strict types should apply. */
139139
if (!ZEND_ARG_USES_STRICT_TYPES()) {
140-
zend_long lval = 0;
141140
if (is_operator && Z_TYPE_P(arg) == IS_NULL) {
142141
return false;
143142
}
144-
if (!zend_parse_arg_long_weak(arg, &lval, arg_num)) {
143+
zend_opt_long result = zend_parse_arg_long_weak(arg, arg_num);
144+
if (!result.has_value) {
145145
return false;
146146
}
147147

148-
mpz_set_si(*destination_mpz_ptr, lval);
148+
mpz_set_si(*destination_mpz_ptr, result.value);
149149

150150
return true;
151151
}

ext/mbstring/mbstring.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2317,7 +2317,7 @@ PHP_FUNCTION(mb_substr_count)
23172317
PHP_FUNCTION(mb_substr)
23182318
{
23192319
zend_string *str, *encoding = NULL;
2320-
zend_long from, len;
2320+
zend_long from, len = 0;
23212321
size_t real_from, real_len;
23222322
bool len_is_null = true;
23232323

ext/openssl/openssl.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2790,7 +2790,7 @@ PHP_FUNCTION(openssl_pkcs7_sign)
27902790
X509 *cert = NULL;
27912791
zend_object *cert_obj;
27922792
zend_string *cert_str;
2793-
zval *zprivkey, * zheaders;
2793+
zval *zprivkey, * zheaders = NULL;
27942794
zval * hval;
27952795
EVP_PKEY * privkey = NULL;
27962796
zend_long flags = PKCS7_DETACHED;

0 commit comments

Comments
 (0)