Bah, I've bumped into this often enough. Change one unsatisfactory cast for
authorjacob <jacob@cda61777-01e9-0310-a592-d414129be87e>
Sun, 4 Jan 2009 22:24:08 +0000 (22:24 +0000)
committerjacob <jacob@cda61777-01e9-0310-a592-d414129be87e>
Sun, 4 Jan 2009 22:24:08 +0000 (22:24 +0000)
another to shut up "warning: cast from pointer to integer of different size"
(and hence a -Werror compile failure) when compiling for Unix with DEBUG
defined on atreus (x86_64). Minimally checked that it doesn't introduce upset
elsewhere (i386).

git-svn-id: svn://svn.tartarus.org/sgt/putty@8380 cda61777-01e9-0310-a592-d414129be87e

misc.c

diff --git a/misc.c b/misc.c
index fbfc34f..8f728ee 100644 (file)
--- a/misc.c
+++ b/misc.c
@@ -605,7 +605,7 @@ void debug_memdump(void *buf, int len, int L)
     if (L) {
        int delta;
        debug_printf("\t%d (0x%x) bytes:\n", len, len);
-       delta = 15 & (int) p;
+       delta = 15 & (unsigned long int) p;
        p -= delta;
        len += delta;
     }