]> asedeno.scripts.mit.edu Git - PuTTY.git/commitdiff
Bah, I've bumped into this often enough. Change one unsatisfactory cast for
authorJacob Nevins <jacobn@chiark.greenend.org.uk>
Sun, 4 Jan 2009 22:24:08 +0000 (22:24 +0000)
committerJacob Nevins <jacobn@chiark.greenend.org.uk>
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).

[originally from svn r8380]

misc.c

diff --git a/misc.c b/misc.c
index fbfc34f25ad30362007b2e1d5ee6f7325a8cf139..8f728eea214f3b52e0d9015fafdf562928a0e9ea 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;
     }