public inbox for glibc-cvs@sourceware.org
help / color / mirror / Atom feed
From: Adhemerval Zanella <azanella@sourceware.org>
To: glibc-cvs@sourceware.org
Subject: [glibc/azanella/clang] Use 'z' instead of 'Z' on printf functions
Date: Tue, 15 Mar 2022 18:39:05 +0000 (GMT)	[thread overview]
Message-ID: <20220315183905.A2186385840E@sourceware.org> (raw)

https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=b7bc24410615713dd775ea98a972ab42983b0ae1

commit b7bc24410615713dd775ea98a972ab42983b0ae1
Author: Adhemerval Zanella <adhemerval.zanella@linaro.org>
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 : "<UNKNOWN>"));
 
 	    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'"),


             reply	other threads:[~2022-03-15 18:39 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-03-15 18:39 Adhemerval Zanella [this message]
  -- strict thread matches above, loose matches on Subject: below --
2022-06-09 21:15 [glibc/azanella/clang] Use '%z' instead of '%Z' " Adhemerval Zanella
2022-06-09 13:12 Adhemerval Zanella
2022-06-03 14:01 Adhemerval Zanella
2022-05-13 14:15 Adhemerval Zanella
2022-05-12 19:29 Adhemerval Zanella
2022-05-10 18:19 Adhemerval Zanella
2022-04-29 13:59 Adhemerval Zanella
2022-04-04 12:49 Adhemerval Zanella
2022-03-31 19:02 Adhemerval Zanella
2022-03-29 20:25 Adhemerval Zanella
2022-03-16 18:01 [glibc/azanella/clang] Use 'z' instead of 'Z' " Adhemerval Zanella
2022-03-11 17:23 Adhemerval Zanella
2022-03-10 19:22 Adhemerval Zanella

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20220315183905.A2186385840E@sourceware.org \
    --to=azanella@sourceware.org \
    --cc=glibc-cvs@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).