Skip to content

Resolve MSVC C4244 level 2 warnings #17076

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 5 commits into
base: master
Choose a base branch
from
Draft
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Merge branch 'master' into cmb/c4244
  • Loading branch information
cmb69 authored Dec 10, 2024
commit e8204d0cad75a57c7f6838c4e9072ae60f61bee7
10 changes: 0 additions & 10 deletions ext/gd/gd.c
Original file line number Diff line number Diff line change
Expand Up @@ -4017,12 +4017,6 @@ PHP_FUNCTION(imageaffine)
if ((zval_affine_elem = zend_hash_index_find(Z_ARRVAL_P(z_affine), i)) != NULL) {
switch (Z_TYPE_P(zval_affine_elem)) {
case IS_LONG:
affine[i] = (double) Z_LVAL_P(zval_affine_elem);
if (affine[i] < INT_MIN || affine[i] > INT_MAX) {
zend_argument_value_error(2, "element %i must be between %d and %d", i, INT_MIN, INT_MAX);
RETURN_THROWS();
}
break;
case IS_DOUBLE:
case IS_STRING:
affine[i] = zval_get_double(zval_affine_elem);
Expand Down Expand Up @@ -4189,8 +4183,6 @@ PHP_FUNCTION(imageaffinematrixconcat)
if ((tmp = zend_hash_index_find(Z_ARRVAL_P(z_m1), i)) != NULL) {
switch (Z_TYPE_P(tmp)) {
case IS_LONG:
m1[i] = (double) Z_LVAL_P(tmp);
break;
case IS_DOUBLE:
case IS_STRING:
m1[i] = zval_get_double(tmp);
Expand All @@ -4204,8 +4196,6 @@ PHP_FUNCTION(imageaffinematrixconcat)
if ((tmp = zend_hash_index_find(Z_ARRVAL_P(z_m2), i)) != NULL) {
switch (Z_TYPE_P(tmp)) {
case IS_LONG:
m2[i] = (double) Z_LVAL_P(tmp);
break;
case IS_DOUBLE:
case IS_STRING:
m2[i] = zval_get_double(tmp);
Expand Down
Loading
You are viewing a condensed version of this merge commit. You can view the full changes here.