1
0
mirror of https://github.com/postgres/postgres.git synced 2025-11-19 13:42:17 +03:00

Use PRI?64 instead of "ll?" in format strings (continued).

Continuation of work started in commit 15a79c73, after initial trial.

Author: Thomas Munro <thomas.munro@gmail.com>
Discussion: https://postgr.es/m/b936d2fb-590d-49c3-a615-92c3a88c6c19%40eisentraut.org
This commit is contained in:
Peter Eisentraut
2025-03-29 10:30:08 +01:00
parent a0a4601765
commit a0ed19e0a9
54 changed files with 302 additions and 311 deletions

View File

@@ -3185,9 +3185,9 @@ printTableInit(printTableContent *const content, const printTableOpt *opt,
/* Catch possible overflow. Using >= here allows adding 1 below */
if (total_cells >= SIZE_MAX / sizeof(*content->cells))
{
fprintf(stderr, _("Cannot print table contents: number of cells %lld is equal to or exceeds maximum %lld.\n"),
(long long int) total_cells,
(long long int) (SIZE_MAX / sizeof(*content->cells)));
fprintf(stderr, _("Cannot print table contents: number of cells %" PRId64 " is equal to or exceeds maximum %zu.\n"),
total_cells,
SIZE_MAX / sizeof(*content->cells));
exit(EXIT_FAILURE);
}
content->cells = pg_malloc0((total_cells + 1) * sizeof(*content->cells));
@@ -3269,8 +3269,8 @@ printTableAddCell(printTableContent *const content, char *cell,
total_cells = (uint64) content->ncolumns * content->nrows;
if (content->cellsadded >= total_cells)
{
fprintf(stderr, _("Cannot add cell to table content: total cell count of %lld exceeded.\n"),
(long long int) total_cells);
fprintf(stderr, _("Cannot add cell to table content: total cell count of %" PRId64 " exceeded.\n"),
total_cells);
exit(EXIT_FAILURE);
}