<<< Date Index >>>     <<< Thread Index >>>

[PATCH] init warning



I get a warning building init.c on my AMD64 box, because one of the debug
prints casts pointers to "unsigned int". This isn't large enough to hold a
64-bit pointer.

The attached patch changes the print to use "%p" instead. I believe this is
standard C, but if people are aware of platforms where mutt is supported and
where this doesn't work, please let me know...

-- 
Paul
diff -r f467353f5657 init.c
--- a/init.c    Sat Mar 31 18:50:39 2007 -0700
+++ b/init.c    Sun May 18 17:33:05 2008 +0100
@@ -933,8 +933,8 @@ static int parse_attach_list (BUFFER *bu
 
   /* Find the last item in the list that data points to. */
   lastp = NULL;
-  dprint(5, (debugfile, "parse_attach_list: ldata = %08x, *ldata = %08x\n",
-             (unsigned int)ldata, (unsigned int)*ldata));
+  dprint(5, (debugfile, "parse_attach_list: ldata = %p, *ldata = %p\n",
+             (void *)ldata, (void *)*ldata));
   for (listp = *ldata; listp; listp = listp->next)
   {
     a = (ATTACH_MATCH *)listp->data;

Attachment: signature.asc
Description: Digital signature