OSDN Git Service

* strace.cc (handle_output_debug_string): Fix compiler warning.
authorcorinna <corinna>
Mon, 7 Mar 2005 10:24:22 +0000 (10:24 +0000)
committercorinna <corinna>
Mon, 7 Mar 2005 10:24:22 +0000 (10:24 +0000)
winsup/utils/ChangeLog
winsup/utils/strace.cc

index 51f34cd..44a5d12 100644 (file)
@@ -1,3 +1,7 @@
+2005-03-07  Corinna Vinschen  <corinna@vinschen.de>
+
+       * strace.cc (handle_output_debug_string): Fix compiler warning.
+
 2005-03-06  Christopher Faylor  <cgf@timesys.com>
 
        * cygpath.cc (usage): Pass in one more copy of program_name to printf
index 998350c..ab0dc62 100644 (file)
@@ -436,7 +436,7 @@ handle_output_debug_string (DWORD id, LPVOID p, unsigned mask, FILE *ofile)
   buf[len] = '\0';
   char *s = strtok (buf, " ");
 
-  unsigned n = strtoul (s, NULL, 16);
+  unsigned long n = strtoul (s, NULL, 16);
 
   s = strchr (s, '\0') + 1;
 
@@ -562,7 +562,7 @@ handle_output_debug_string (DWORD id, LPVOID p, unsigned mask, FILE *ofile)
   if (include_hex)
     {
       s -= 8;
-      sprintf (s, "%p", n);
+      sprintf (s, "%p", (void *) n);
       strchr (s, '\0')[0] = ' ';
     }
   child->last_usecs = usecs;