Fix some format string signedness mistakes (#722)

This commit is contained in:
Niels Dossche
2025-03-23 10:21:58 -07:00
committed by GitHub
parent cec37ecb4e
commit 4af6f00102
3 changed files with 4 additions and 4 deletions
+1 -1
View File
@@ -2424,7 +2424,7 @@ PHP_METHOD(Imagick, importImagePixels)
zend_throw_exception_ex(
php_imagick_exception_class_entry,
0,
"The map contains incorrect number of elements. Expected %ld, array has %d",
"The map contains incorrect number of elements. Expected %ld, array has %u",
(width * height) * map_len,
zend_hash_num_elements(array)
);
+1 -1
View File
@@ -42,7 +42,7 @@ MagickBooleanType php_imagick_progress_monitor(const char *text, const MagickOff
return MagickFalse;
}
fprintf(fp, "text: %s, offset: %lld, span: %lld\n", text, offset, span);
fprintf(fp, "text: %s, offset: %lld, span: %llu\n", text, offset, span);
fclose(fp);
return MagickTrue;
}
+2 -2
View File
@@ -365,7 +365,7 @@ PHP_METHOD(ImagickKernel, fromMatrix)
zend_throw_exception_ex(
php_imagickkernel_exception_class_entry,
5 TSRMLS_CC,
"origin_x for matrix is outside bounds of columns: " ZEND_LONG_FMT,
"origin_x for matrix is outside bounds of columns: %zu",
origin_x
);
goto cleanup;
@@ -387,7 +387,7 @@ PHP_METHOD(ImagickKernel, fromMatrix)
zend_throw_exception_ex(
php_imagickkernel_exception_class_entry,
5 TSRMLS_CC,
"origin_y for matrix is outside bounds of rows: " ZEND_LONG_FMT,
"origin_y for matrix is outside bounds of rows: %zu",
origin_x
);
goto cleanup;