Skip to content

Commit b2c0db1

Browse files
committed
Merge branch 'PHP-8.2' into PHP-8.3
* PHP-8.2: ext/readline: Fix [-Wcalloc-transposed-args] compiler warning ext/pdo_mysql: Fix [-Wcalloc-transposed-args] compiler warning ext/gd: Fix [-Wcalloc-transposed-args] compiler warning ext/ffi: Fix [-Wenum-int-mismatch] compiler warning ext/bcmath: Fix [-Wenum-int-mismatch] compiler warning
2 parents 59744a7 + 0accfd1 commit b2c0db1

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

ext/gd/libgd/gd_topal.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1498,23 +1498,23 @@ static int gdImageTrueColorToPaletteBody (gdImagePtr oim, int dither, int colors
14981498
colorsWanted = maxColors;
14991499
}
15001500
if (!cimP) {
1501-
nim->pixels = gdCalloc (sizeof (unsigned char *), oim->sy);
1501+
nim->pixels = gdCalloc (oim->sy, sizeof (unsigned char *));
15021502
if (!nim->pixels)
15031503
{
15041504
/* No can do */
15051505
goto outOfMemory;
15061506
}
15071507
for (i = 0; (i < nim->sy); i++)
15081508
{
1509-
nim->pixels[i] = gdCalloc (sizeof (unsigned char *), oim->sx);
1509+
nim->pixels[i] = gdCalloc (oim->sx, sizeof (unsigned char *));
15101510
if (!nim->pixels[i])
15111511
{
15121512
goto outOfMemory;
15131513
}
15141514
}
15151515
}
15161516

1517-
cquantize = (my_cquantize_ptr) gdCalloc (sizeof (my_cquantizer), 1);
1517+
cquantize = (my_cquantize_ptr) gdCalloc (1, sizeof (my_cquantizer));
15181518
if (!cquantize)
15191519
{
15201520
/* No can do */

ext/pdo_mysql/mysql_statement.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -581,7 +581,7 @@ static int pdo_mysql_stmt_fetch(pdo_stmt_t *stmt, enum pdo_fetch_orientation ori
581581
}
582582

583583
if (!S->current_row) {
584-
S->current_row = ecalloc(sizeof(zval), stmt->column_count);
584+
S->current_row = ecalloc(stmt->column_count, sizeof(zval));
585585
}
586586
for (unsigned i = 0; i < stmt->column_count; i++) {
587587
zval_ptr_dtor_nogc(&S->current_row[i]);

ext/readline/readline.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -456,7 +456,7 @@ char **php_readline_completion_cb(const char *text, int start, int end)
456456
matches = rl_completion_matches(text,_readline_command_generator);
457457
} else {
458458
/* libedit will read matches[2] */
459-
matches = calloc(sizeof(char *), 3);
459+
matches = calloc(3, sizeof(char *));
460460
if (!matches) {
461461
return NULL;
462462
}

0 commit comments

Comments
 (0)