[ob] Make memory-map.c compile again

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

[ob] Make memory-map.c compile again

Mark Kettenis
Someone has been writing too much C++ code.

Committed as obvious,

Mark

Index: ChangeLog
from  Mark Kettenis  <[hidden email]>

        * memory-map.c (memory_map_end_element): Move variable
        declarations to the begining of the block.

Index: memory-map.c
===================================================================
RCS file: /cvs/src/src/gdb/memory-map.c,v
retrieving revision 1.3
diff -u -p -r1.3 memory-map.c
--- memory-map.c 5 Oct 2006 19:42:31 -0000 1.3
+++ memory-map.c 29 Dec 2006 09:34:07 -0000
@@ -141,10 +141,11 @@ memory_map_end_element (void *data_, con
  {
   if (strcmp (data->property_name, "blocksize") == 0)
     {
+      char *end = NULL;
+
       if (!data->character_data)
  throw_error (XML_PARSE_ERROR,
      _("Empty content of 'property' element"));
-      char *end = NULL;
       data->currently_parsing->attrib.blocksize
  = strtoul (data->character_data, &end, 0);
       if (*end != '\0')
Reply | Threaded
Open this post in threaded view
|

Re: [ob] Make memory-map.c compile again

Daniel Jacobowitz-2
On Fri, Dec 29, 2006 at 10:49:25AM +0100, Mark Kettenis wrote:
> * memory-map.c (memory_map_end_element): Move variable
> declarations to the begining of the block.

Thanks.  While I'm revising warnings, this would be a good time for us
to add -Wdeclaration-after-statement.

--
Daniel Jacobowitz
CodeSourcery