* exec.c (xfer_memory): Fix compilation warning with old versions
authorJoel Brobecker <brobecker@gnat.com>
Thu, 12 Sep 2002 19:49:56 +0000 (19:49 +0000)
committerJoel Brobecker <brobecker@gnat.com>
Thu, 12 Sep 2002 19:49:56 +0000 (19:49 +0000)
        of GCC.
        * tracepoint.c (trace_find_tracepoint_command): Likewise.

gdb/ChangeLog
gdb/exec.c
gdb/tracepoint.c

index 41d025e53941ba35759bfe4908324651a9e34c46..f51bafb0af032f3726252f3b2e0719e0eed20667 100644 (file)
@@ -1,3 +1,9 @@
+2002-09-12  Joel Brobecker  <brobecker@gnat.com>
+
+       * exec.c (xfer_memory): Fix compilation warning with old versions
+       of GCC.
+       * tracepoint.c (trace_find_tracepoint_command): Likewise.
+
 2002-09-12  David Carlton  <carlton@math.stanford.edu>
 
        * symtab.h: Run through gdb_indent.h.
index 0228f419465fc7c249a505b6137f8ed84946d90f..3a3e888b9554b5e404cc45eb98947f97d040773f 100644 (file)
@@ -507,26 +507,28 @@ xfer_memory (CORE_ADDR memaddr, char *myaddr, int len, int write,
          strcmp (section->name, p->the_bfd_section->name) != 0)
        continue;               /* not the section we need */
       if (memaddr >= p->addr)
-       if (memend <= p->endaddr)
-         {
-           /* Entire transfer is within this section.  */
-           res = xfer_fn (p->bfd, p->the_bfd_section, myaddr,
-                          memaddr - p->addr, len);
-           return (res != 0) ? len : 0;
-         }
-       else if (memaddr >= p->endaddr)
-         {
-           /* This section ends before the transfer starts.  */
-           continue;
-         }
-       else
-         {
-           /* This section overlaps the transfer.  Just do half.  */
-           len = p->endaddr - memaddr;
-           res = xfer_fn (p->bfd, p->the_bfd_section, myaddr,
-                          memaddr - p->addr, len);
-           return (res != 0) ? len : 0;
-         }
+        {
+         if (memend <= p->endaddr)
+           {
+             /* Entire transfer is within this section.  */
+             res = xfer_fn (p->bfd, p->the_bfd_section, myaddr,
+                            memaddr - p->addr, len);
+             return (res != 0) ? len : 0;
+           }
+         else if (memaddr >= p->endaddr)
+           {
+             /* This section ends before the transfer starts.  */
+             continue;
+           }
+         else
+           {
+             /* This section overlaps the transfer.  Just do half.  */
+             len = p->endaddr - memaddr;
+             res = xfer_fn (p->bfd, p->the_bfd_section, myaddr,
+                            memaddr - p->addr, len);
+             return (res != 0) ? len : 0;
+           }
+        }
       else
        nextsectaddr = min (nextsectaddr, p->addr);
     }
index 976f9259cddfaf0959b91229138aaac55abf358b..2d12f31d57bc884566a3382eba59bacc648e9f37 100644 (file)
@@ -2071,10 +2071,12 @@ trace_find_tracepoint_command (char *args, int from_tty)
   if (target_is_remote ())
     {
       if (args == 0 || *args == 0)
-       if (tracepoint_number == -1)
-         error ("No current tracepoint -- please supply an argument.");
-       else
-         tdp = tracepoint_number;      /* default is current TDP */
+       {
+         if (tracepoint_number == -1)
+           error ("No current tracepoint -- please supply an argument.");
+         else
+           tdp = tracepoint_number;    /* default is current TDP */
+       }
       else
        tdp = parse_and_eval_long (args);