cc1: warnings being treated as errors
darwin-nat.c: In function ‘darwin_ptrace’:
darwin-nat.c:259: warning: format ‘%x’ expects type ‘unsigned int’, but 
argument 5 has type ‘caddr_t’
darwin-nat.c: In function ‘darwin_resume’:
darwin-nat.c:839: warning: format ‘%x’ expects type ‘unsigned int’, but 
argument 4 has type ‘long int’
darwin-nat.c: In function ‘cancel_breakpoint’:
darwin-nat.c:1065: warning: format ‘%x’ expects type ‘unsigned int’, but 
argument 3 has type ‘long int’
darwin-nat.c: In function ‘_initialize_darwin_inferior’:
darwin-nat.c:2174: warning: format ‘%lx’ expects type ‘long unsigned int’, but 
argument 3 has type ‘mach_port_t’

patch attached, although I don't know if the change for line 259 and 2174 are 
the right approach.
--
Joshua Kordani
LSA Autonomy
diff --git a/gdb/darwin-nat.c b/gdb/darwin-nat.c
index e1acc05..ebfa98e 100644
--- a/gdb/darwin-nat.c
+++ b/gdb/darwin-nat.c
@@ -254,8 +254,8 @@ darwin_ptrace (const char *name,
   if (ret == -1 && errno == 0)
     ret = 0;
 
-  inferior_debug (4, _("ptrace (%s, %d, 0x%x, %d): %d (%s)\n"),
-                  name, pid, arg3, arg4, ret,
+  inferior_debug (4, _("ptrace (%s, %d, 0x%lx, %d): %d (%s)\n"),
+                  name, pid, (unsigned long) arg3, arg4, ret,
                   (ret != 0) ? safe_strerror (errno) : _("no error"));
   return ret;
 }
@@ -835,7 +835,7 @@ darwin_resume (ptid_t ptid, int step, enum gdb_signal 
signal)
   struct inferior *inf;
 
   inferior_debug
-    (2, _("darwin_resume: pid=%d, tid=0x%x, step=%d, signal=%d\n"),
+    (2, _("darwin_resume: pid=%d, tid=0x%ld, step=%d, signal=%d\n"),
      ptid_get_pid (ptid), ptid_get_tid (ptid), step, signal);
 
   if (signal == GDB_SIGNAL_0)
@@ -1061,7 +1061,7 @@ cancel_breakpoint (ptid_t ptid)
   pc = regcache_read_pc (regcache) - gdbarch_decr_pc_after_break (gdbarch);
   if (breakpoint_inserted_here_p (get_regcache_aspace (regcache), pc))
     {
-      inferior_debug (4, "cancel_breakpoint for thread 0x%x\n",
+      inferior_debug (4, "cancel_breakpoint for thread 0x%ld\n",
                      ptid_get_tid (ptid));
 
       /* Back up the PC if necessary.  */
@@ -2170,7 +2170,7 @@ _initialize_darwin_inferior (void)
 
   add_target (darwin_ops);
 
-  inferior_debug (2, _("GDB task: 0x%lx, pid: %d\n"), mach_task_self (),
+  inferior_debug (2, _("GDB task: 0x%lx, pid: %d\n"), (unsigned long) 
mach_task_self (),
                   getpid ());
 
   add_setshow_zuinteger_cmd ("darwin", class_obscure,
_______________________________________________
bug-binutils mailing list
bug-binutils@gnu.org
https://lists.gnu.org/mailman/listinfo/bug-binutils

Reply via email to