All of lore.kernel.org
 help / color / mirror / Atom feed
From: Ruediger Meier <sweet_f_a@gmx.de>
To: util-linux@vger.kernel.org
Cc: Heiko Carstens <heiko.carstens@de.ibm.com>
Subject: [PATCH 2/2] chmem: don't use scanf format for printf
Date: Fri,  7 Apr 2017 13:35:59 +0200	[thread overview]
Message-ID: <20170407113559.16107-2-sweet_f_a@gmx.de> (raw)
In-Reply-To: <20170407113559.16107-1-sweet_f_a@gmx.de>

From: Ruediger Meier <ruediger.meier@ga-group.nl>

The compiler had not complained here because both macros are
probably the same.

But gettext issued a funny warning:
sys-utils/chmem.c:67: warning: Although being used in a format string position, the msgid is not a valid C format string. Reason: The string ends in the middle of a directive.

CC: Heiko Carstens <heiko.carstens@de.ibm.com>
Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
---
 sys-utils/chmem.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/sys-utils/chmem.c b/sys-utils/chmem.c
index ad394ac4c..44733bf76 100644
--- a/sys-utils/chmem.c
+++ b/sys-utils/chmem.c
@@ -64,7 +64,7 @@ static void idxtostr(struct chmem_desc *desc, uint64_t idx, char *buf, size_t bu
 	start = idx * desc->block_size;
 	end = start + desc->block_size - 1;
 	snprintf(buf, bufsz,
-		 _("Memory Block %"SCNu64" (0x%016"PRIx64"-0x%016"PRIx64")"),
+		 _("Memory Block %"PRIu64" (0x%016"PRIx64"-0x%016"PRIx64")"),
 		 idx, start, end);
 }
 
-- 
2.12.0


  reply	other threads:[~2017-04-07 11:36 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-04-07 11:35 [PATCH 1/2] misc: fix some printf format strings Ruediger Meier
2017-04-07 11:35 ` Ruediger Meier [this message]
2017-04-10 13:43 ` Karel Zak

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=20170407113559.16107-2-sweet_f_a@gmx.de \
    --to=sweet_f_a@gmx.de \
    --cc=heiko.carstens@de.ibm.com \
    --cc=util-linux@vger.kernel.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.