Fix incorrect format placeholders
authorPeter Eisentraut <peter@eisentraut.org>
Fri, 25 Apr 2025 14:49:30 +0000 (16:49 +0200)
committerPeter Eisentraut <peter@eisentraut.org>
Fri, 25 Apr 2025 14:49:30 +0000 (16:49 +0200)
Before commit a0ed19e0a9e there was a cast around these, but the cast
inadvertently changed the signedness, but that made the format
placeholder correct.  Commit a0ed19e0a9e removed the casts, so now the
format placeholders had the wrong signedness.

src/fe_utils/print.c

index 28d5bb0bd5d71f4fb30c19756e6cd9a8046d7c66..4af0f32f2fc05c45f9129fc9c82c65a089dea852 100644 (file)
@@ -3185,7 +3185,7 @@ 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 %" PRId64 " is equal to or exceeds maximum %zu.\n"),
+       fprintf(stderr, _("Cannot print table contents: number of cells %" PRIu64 " is equal to or exceeds maximum %zu.\n"),
                total_cells,
                SIZE_MAX / sizeof(*content->cells));
        exit(EXIT_FAILURE);
@@ -3269,7 +3269,7 @@ 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 %" PRId64 " exceeded.\n"),
+       fprintf(stderr, _("Cannot add cell to table content: total cell count of %" PRIu64 " exceeded.\n"),
                total_cells);
        exit(EXIT_FAILURE);
    }