From 3db26b01ffb7bebae01c937865b6d25d0d28ed6f Mon Sep 17 00:00:00 2001 From: Joel Brobecker Date: Thu, 12 Sep 2002 19:49:56 +0000 Subject: * exec.c (xfer_memory): Fix compilation warning with old versions of GCC. * tracepoint.c (trace_find_tracepoint_command): Likewise. --- gdb/ChangeLog | 6 ++++++ gdb/exec.c | 42 ++++++++++++++++++++++-------------------- gdb/tracepoint.c | 10 ++++++---- 3 files changed, 34 insertions(+), 24 deletions(-) (limited to 'gdb') diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 41d025e..f51bafb 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,9 @@ +2002-09-12 Joel Brobecker + + * exec.c (xfer_memory): Fix compilation warning with old versions + of GCC. + * tracepoint.c (trace_find_tracepoint_command): Likewise. + 2002-09-12 David Carlton * symtab.h: Run through gdb_indent.h. diff --git a/gdb/exec.c b/gdb/exec.c index 0228f41..3a3e888 100644 --- a/gdb/exec.c +++ b/gdb/exec.c @@ -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); } diff --git a/gdb/tracepoint.c b/gdb/tracepoint.c index 976f925..2d12f31 100644 --- a/gdb/tracepoint.c +++ b/gdb/tracepoint.c @@ -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); -- cgit v1.1