public inbox for cygwin-patches@cygwin.com
 help / color / mirror / Atom feed
* [PATCH] Fix some debug string format specifiers.
@ 2013-12-22  0:39 Ray Donnelly
  2014-01-07 15:06 ` Corinna Vinschen
  0 siblings, 1 reply; 2+ messages in thread
From: Ray Donnelly @ 2013-12-22  0:39 UTC (permalink / raw)
  To: cygwin-patches

[-- Attachment #1: Type: text/plain, Size: 63 bytes --]

I hope patches generated with git are OK?

Best regards,

Ray.

[-- Attachment #2: 0001-winsup-cygwin-gmon.c-_mcleanup-Fix-some-debug-string.patch --]
[-- Type: application/octet-stream, Size: 1081 bytes --]

From d5e06c40ba30d3f8ebbdcb99a8279d0c38db456a Mon Sep 17 00:00:00 2001
From: Ray Donnelly <mingw.android@gmail.com>
Date: Thu, 19 Dec 2013 19:01:53 +0000
Subject: [PATCH 1/3] * winsup/cygwin/gmon.c (_mcleanup): Fix some debug string
 format specifiers

---
 winsup/cygwin/gmon.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/winsup/cygwin/gmon.c b/winsup/cygwin/gmon.c
index 96b1189..16f1034 100644
--- a/winsup/cygwin/gmon.c
+++ b/winsup/cygwin/gmon.c
@@ -233,7 +233,7 @@ _mcleanup(void)
 		perror("mcount: gmon.log");
 		return;
 	}
-	len = sprintf(dbuf, "[mcleanup1] kcount 0x%x ssiz %d\n",
+	len = sprintf(dbuf, "[mcleanup1] kcount 0x%p ssiz %zd\n",
 	    p->kcount, p->kcountsize);
 	write(log, dbuf, len);
 #endif
@@ -256,7 +256,7 @@ _mcleanup(void)
 		     toindex = p->tos[toindex].link) {
 #ifdef DEBUG
 			len = sprintf(dbuf,
-			"[mcleanup2] frompc 0x%x selfpc 0x%x count %d\n" ,
+			"[mcleanup2] frompc 0x%zd selfpc 0x%zd count %zd\n" ,
 				frompc, p->tos[toindex].selfpc,
 				p->tos[toindex].count);
 			write(log, dbuf, len);
-- 
1.8.5.2


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH] Fix some debug string format specifiers.
  2013-12-22  0:39 [PATCH] Fix some debug string format specifiers Ray Donnelly
@ 2014-01-07 15:06 ` Corinna Vinschen
  0 siblings, 0 replies; 2+ messages in thread
From: Corinna Vinschen @ 2014-01-07 15:06 UTC (permalink / raw)
  To: cygwin-patches

[-- Attachment #1: Type: text/plain, Size: 847 bytes --]

On Dec 22 00:39, Ray Donnelly wrote:
> I hope patches generated with git are OK?

In theory, yes, but please attach them inline to the mail, otherwise
they won't show up in the reply with some mailers, so it's a hassle
to discuss them.

As for this patch, did you actually test it?

-	len = sprintf(dbuf, "[mcleanup1] kcount 0x%x ssiz %d\n",
+	len = sprintf(dbuf, "[mcleanup1] kcount 0x%p ssiz %zd\n",

%p implies printing the 0x prefix, so this results in twice the prefix.

-                       "[mcleanup2] frompc 0x%x selfpc 0x%x count %d\n" ,
+                       "[mcleanup2] frompc 0x%zd selfpc 0x%zd count %zd\n" ,

0x prefix and 'd' format specifier?


Corinna

-- 
Corinna Vinschen                  Please, send mails regarding Cygwin to
Cygwin Maintainer                 cygwin AT cygwin DOT com
Red Hat

[-- Attachment #2: Type: application/pgp-signature, Size: 819 bytes --]

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2014-01-07 15:06 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-12-22  0:39 [PATCH] Fix some debug string format specifiers Ray Donnelly
2014-01-07 15:06 ` Corinna Vinschen

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).