From: Josh Triplett <josh@freedesktop.org>
To: Damien Lespiau <damien.lespiau@gmail.com>
Cc: Al Viro <viro@ftp.linux.org.uk>, linux-sparse@vger.kernel.org
Subject: Re: [PATCH] Fix compilation warning on 64 bits platforms
Date: Tue, 22 May 2007 14:20:14 -0700 [thread overview]
Message-ID: <46535E8E.10504@freedesktop.org> (raw)
In-Reply-To: <cbf3148c0705221106n68cacf3g82faeba38d964945@mail.gmail.com>
[-- Attachment #1: Type: text/plain, Size: 1205 bytes --]
Damien Lespiau wrote:
>> Al Viro wrote:
>>> Not just glibc; it's in C99. So yes, I'd say we should use %td here.
>
> Much better than my ugly cast. I feel stupid to "sign" a one letter patch
> that is not mine, but I guess you expect me to resend it.
Don't worry about it. I went ahead and made the change:
From 3195f83203cfd6d05cd56829c02c16b5dc5c274d Mon Sep 17 00:00:00 2001
From: Josh Triplett <josh@freedesktop.org>
Date: Tue, 22 May 2007 14:18:28 -0700
Subject: [PATCH] Use %td when printing a ptrdiff_t to avoid problems on 64-bit platforms
Thanks to Damien Lespiau for reporting the problem.
Signed-off-by: Josh Triplett <josh@freedesktop.org>
---
linearize.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/linearize.c b/linearize.c
index d428d92..c38dd7d 100644
--- a/linearize.c
+++ b/linearize.c
@@ -461,7 +461,7 @@ const char *show_instruction(struct instruction *insn)
}
if (buf >= buffer + sizeof(buffer))
- die("instruction buffer overflowed %d\n", buf - buffer);
+ die("instruction buffer overflowed %td\n", buf - buffer);
do { --buf; } while (*buf == ' ');
*++buf = 0;
return buffer;
- Josh Triplett
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 252 bytes --]
prev parent reply other threads:[~2007-05-22 21:20 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-05-21 0:04 [PATCH] Fix compilation warning on 64 bits platforms Damien Lespiau
2007-05-21 0:28 ` Josh Triplett
2007-05-21 0:33 ` Al Viro
2007-05-21 0:36 ` Josh Triplett
2007-05-22 18:06 ` Damien Lespiau
2007-05-22 21:20 ` Josh Triplett [this message]
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=46535E8E.10504@freedesktop.org \
--to=josh@freedesktop.org \
--cc=damien.lespiau@gmail.com \
--cc=linux-sparse@vger.kernel.org \
--cc=viro@ftp.linux.org.uk \
/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 NNTP newsgroup(s).