From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 1791) id CCFC13857831; Fri, 11 Mar 2022 17:23:11 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org CCFC13857831 Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: Adhemerval Zanella To: glibc-cvs@sourceware.org Subject: [glibc/azanella/clang] Use 'z' instead of 'Z' on printf functions X-Act-Checkin: glibc X-Git-Author: Adhemerval Zanella X-Git-Refname: refs/heads/azanella/clang X-Git-Oldrev: 334552da5bade1bf51c9b56d38ab79a95cefbc0a X-Git-Newrev: dc920a827da68855350319dd9cba0236b8f9a1ba Message-Id: <20220311172311.CCFC13857831@sourceware.org> Date: Fri, 11 Mar 2022 17:23:11 +0000 (GMT) X-BeenThere: glibc-cvs@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Glibc-cvs mailing list List-Unsubscribe: , List-Archive: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 11 Mar 2022 17:23:12 -0000 https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=dc920a827da68855350319dd9cba0236b8f9a1ba commit dc920a827da68855350319dd9cba0236b8f9a1ba Author: Adhemerval Zanella Date: Thu Mar 10 08:43:59 2022 -0300 Use 'z' instead of 'Z' on printf functions Diff: --- catgets/gencat.c | 6 +++--- elf/dl-load.c | 2 +- elf/dl-printf.c | 2 +- elf/dl-tunables.c | 2 +- elf/rtld.c | 4 ++-- elf/sprof.c | 12 ++++++------ iconv/iconv_charmap.c | 2 +- locale/programs/ld-collate.c | 8 ++++---- locale/programs/ld-ctype.c | 4 ++-- 9 files changed, 21 insertions(+), 21 deletions(-) diff --git a/catgets/gencat.c b/catgets/gencat.c index cebf1fd435..dec4d936a7 100644 --- a/catgets/gencat.c +++ b/catgets/gencat.c @@ -1033,7 +1033,7 @@ write_out (struct catalog *catalog, const char *output_name, /* If the current message set has a symbolic name write this out first. */ if (set_run->symbol != NULL) - fprintf (fp, "%s#define %sSet %#x\t/* %s:%Zu */\n", + fprintf (fp, "%s#define %sSet %#x\t/* %s:%zu */\n", first ? "" : "\n", set_run->symbol, set_run->number - 1, set_run->fname, set_run->line); first = 0; @@ -1047,12 +1047,12 @@ write_out (struct catalog *catalog, const char *output_name, if (message_run->symbol != NULL) { if (set_run->symbol == NULL) - fprintf (fp, "#define AutomaticSet%d%s %#x\t/* %s:%Zu */\n", + fprintf (fp, "#define AutomaticSet%d%s %#x\t/* %s:%zu */\n", set_run->number, message_run->symbol, message_run->number, message_run->fname, message_run->line); else - fprintf (fp, "#define %s%s %#x\t/* %s:%Zu */\n", + fprintf (fp, "#define %s%s %#x\t/* %s:%zu */\n", set_run->symbol, message_run->symbol, message_run->number, message_run->fname, message_run->line); diff --git a/elf/dl-load.c b/elf/dl-load.c index 892e8ef2f6..f943feb8cb 100644 --- a/elf/dl-load.c +++ b/elf/dl-load.c @@ -1396,7 +1396,7 @@ cannot enable executable stack as shared object requires"); if (__glibc_unlikely (GLRO(dl_debug_mask) & DL_DEBUG_FILES)) _dl_debug_printf ("\ - dynamic: 0x%0*lx base: 0x%0*lx size: 0x%0*Zx\n\ + dynamic: 0x%0*lx base: 0x%0*lx size: 0x%0*zx\n\ entry: 0x%0*lx phdr: 0x%0*lx phnum: %*u\n\n", (int) sizeof (void *) * 2, (unsigned long int) l->l_ld, diff --git a/elf/dl-printf.c b/elf/dl-printf.c index d3264ba96c..429d2e80c2 100644 --- a/elf/dl-printf.c +++ b/elf/dl-printf.c @@ -113,7 +113,7 @@ _dl_debug_vdprintf (int fd, int tag_p, const char *fmt, va_list arg) /* Recognize the l modifier. It is only important on some platforms where long and int have a different size. We can use the same code for size_t. */ - if (*fmt == 'l' || *fmt == 'Z') + if (*fmt == 'l' || *fmt == 'z') { #if LONG_MAX != INT_MAX long_mod = 1; diff --git a/elf/dl-tunables.c b/elf/dl-tunables.c index 8e7ee9df10..a3e399fda2 100644 --- a/elf/dl-tunables.c +++ b/elf/dl-tunables.c @@ -380,7 +380,7 @@ __tunables_print (void) (long int) cur->type.max); break; case TUNABLE_TYPE_SIZE_T: - _dl_printf ("0x%Zx (min: 0x%Zx, max: 0x%Zx)\n", + _dl_printf ("0x%zx (min: 0x%zx, max: 0x%zx)\n", (size_t) cur->val.numval, (size_t) cur->type.min, (size_t) cur->type.max); diff --git a/elf/rtld.c b/elf/rtld.c index 19e328f89e..57ca2f1562 100644 --- a/elf/rtld.c +++ b/elf/rtld.c @@ -2103,7 +2103,7 @@ dl_main (const ElfW(Phdr) *phdr, /* The library was not found. */ _dl_printf ("\t%s => not found\n", l->l_libname->name); else - _dl_printf ("\t%s => %s (0x%0*Zx)\n", + _dl_printf ("\t%s => %s (0x%0*zx)\n", DSO_FILENAME (l->l_libname->name), DSO_FILENAME (l->l_name), (int) sizeof l->l_map_start * 2, @@ -2125,7 +2125,7 @@ dl_main (const ElfW(Phdr) *phdr, loadbase = LOOKUP_VALUE_ADDRESS (result, false); - _dl_printf ("%s found at 0x%0*Zd in object at 0x%0*Zd\n", + _dl_printf ("%s found at 0x%0*zd in object at 0x%0*zd\n", _dl_argv[i], (int) sizeof ref->st_value * 2, (size_t) ref->st_value, diff --git a/elf/sprof.c b/elf/sprof.c index 405fbcbf38..da7d817b09 100644 --- a/elf/sprof.c +++ b/elf/sprof.c @@ -476,7 +476,7 @@ load_shobj (const char *name) result->kcountsize = textsize / HISTFRACTION; result->hashfraction = HASHFRACTION; if (do_test) - printf ("hashfraction = %d\ndivider = %Zu\n", + printf ("hashfraction = %d\ndivider = %zu\n", result->hashfraction, result->hashfraction * sizeof (struct here_fromstruct)); result->tossize = textsize / HASHFRACTION; @@ -495,7 +495,7 @@ load_shobj (const char *name) * sizeof (struct here_cg_arc_record))); if (do_test) - printf ("expected size: %Zd\n", result->expected_size); + printf ("expected size: %zd\n", result->expected_size); #define SCALE_1_TO_1 0x10000L @@ -1357,15 +1357,15 @@ generate_call_graph (struct profdata *profdata) ? sortsym[runp->idx]->name : "")); if (runp->idx != (size_t) -1l) - printf (" [%Zd]", runp->idx); + printf (" [%zd]", runp->idx); putchar_unlocked ('\n'); runp = runp->next; } /* Info about the function itself. */ - n = printf ("[%Zu]", cnt); - printf ("%*s%5.1f%8.2f%8.2f%9" PRIdMAX " %s [%Zd]\n", + n = printf ("[%zu]", cnt); + printf ("%*s%5.1f%8.2f%8.2f%9" PRIdMAX " %s [%zd]\n", (int) (7 - n), " ", total_ticks ? (100.0 * sortsym[cnt]->ticks) / total_ticks : 0, sortsym[cnt]->ticks * tick_unit, @@ -1384,7 +1384,7 @@ generate_call_graph (struct profdata *profdata) runp->count); if (runp->idx != (size_t) -1l) - printf ("%-9" PRIdMAX " %s [%Zd]\n", + printf ("%-9" PRIdMAX " %s [%zd]\n", sortsym[runp->idx]->calls, sortsym[runp->idx]->name, runp->idx); diff --git a/iconv/iconv_charmap.c b/iconv/iconv_charmap.c index 1992937d6e..98c7649870 100644 --- a/iconv/iconv_charmap.c +++ b/iconv/iconv_charmap.c @@ -440,7 +440,7 @@ process_block (struct convtable *tbl, char *addr, size_t len, FILE *output) ignoring errors. Otherwise punt. */ if (! omit_invalid) { - error (0, 0, _("illegal input sequence at position %Zd"), n); + error (0, 0, _("illegal input sequence at position %zd"), n); return -1; } diff --git a/locale/programs/ld-collate.c b/locale/programs/ld-collate.c index 7b0d1bf70b..4ccdb30f31 100644 --- a/locale/programs/ld-collate.c +++ b/locale/programs/ld-collate.c @@ -1059,7 +1059,7 @@ insert_value (struct linereader *ldfile, const char *symstr, size_t symlen, /* Test whether this element is not already in the list. */ if (elem->next != NULL || elem == collate->cursor) { - lr_error (ldfile, _("order for `%.*s' already defined at %s:%Zu"), + lr_error (ldfile, _("order for `%.*s' already defined at %s:%zu"), (int) symlen, symstr, elem->file, elem->line); lr_ignore_rest (ldfile, 0); return 1; @@ -1235,7 +1235,7 @@ range is not lower than that of the last character"), "LC_COLLATE"); && elem->next == collate->cursor)) { lr_error (ldfile, _("\ -order for `%.*s' already defined at %s:%Zu"), +order for `%.*s' already defined at %s:%zu"), (int) namelen, seq->name, elem->file, elem->line); goto increment; @@ -1378,7 +1378,7 @@ order for `%.*s' already defined at %s:%Zu"), && elem->next == collate->cursor)) { lr_error (ldfile, _("\ -%s: order for `%.*s' already defined at %s:%Zu"), +%s: order for `%.*s' already defined at %s:%zu"), "LC_COLLATE", (int) lenfrom, buf, elem->file, elem->line); continue; @@ -3735,7 +3735,7 @@ error while adding equivalent collating symbol")); || &collate->undefined == collate->cursor) { lr_error (ldfile, - _("%s: order for `%.*s' already defined at %s:%Zu"), + _("%s: order for `%.*s' already defined at %s:%zu"), "LC_COLLATE", 9, "UNDEFINED", collate->undefined.file, collate->undefined.line); diff --git a/locale/programs/ld-ctype.c b/locale/programs/ld-ctype.c index 5169d629ab..fb0bc80b3b 100644 --- a/locale/programs/ld-ctype.c +++ b/locale/programs/ld-ctype.c @@ -526,7 +526,7 @@ internal error in %s, line %u"), __FUNCTION__, __LINE__); { char buf[17]; - snprintf (buf, sizeof buf, "\\%Zo", cnt); + snprintf (buf, sizeof buf, "\\%zo", cnt); record_error (0, 0, _("\ character '%s' in class `%s' must be in class `%s'"), @@ -541,7 +541,7 @@ character '%s' in class `%s' must be in class `%s'"), { char buf[17]; - snprintf (buf, sizeof buf, "\\%Zo", cnt); + snprintf (buf, sizeof buf, "\\%zo", cnt); record_error (0, 0, _("\ character '%s' in class `%s' must not be in class `%s'"),