diff mbox

[OB] Fix c++ build

Message ID 047d7bf16408264a9a052e2df39c@google.com
State New
Headers show

Commit Message

Doug Evans March 16, 2016, 5:36 p.m. UTC
Sergio Durigan Junior writes:
  > On Monday, February 29 2016, Doug Evans wrote:
  >
  > > Hi.
  > >
  > > This is the main patch to add support for multibit and enum bitfields
  > > to "flags" register specs.
  >
  > Hi Doug,
  >
  > This patch (or a newer version of it; I couldn't find it in the mailing
  > list) broke the C++ build:
  >
  >    
<http://gdb-build.sergiodj.net/builders/Fedora-x86_64-cxx-build-m64/builds/2139>

Fixed thusly (and committed), thanks.

2016-03-16  Doug Evans  <dje@google.com>

	* xml-tdesc.c (tdesc_start_enum): Fix c++ build.

    struct tdesc_type *type;
diff mbox

Patch

diff --git a/gdb/xml-tdesc.c b/gdb/xml-tdesc.c
index a0fd08a..aa58385 100644
--- a/gdb/xml-tdesc.c
+++ b/gdb/xml-tdesc.c
@@ -300,8 +300,8 @@  tdesc_start_enum (struct gdb_xml_parser *parser,
  		  const struct gdb_xml_element *element,
  		  void *user_data, VEC(gdb_xml_value_s) *attributes)
  {
-  struct tdesc_parsing_data *data = user_data;
-  char *id = xml_find_attribute (attributes, "id")->value;
+  struct tdesc_parsing_data *data = (struct tdesc_parsing_data *)  
user_data;
+  char *id = (char *) xml_find_attribute (attributes, "id")->value;
    int size = * (ULONGEST *)
      xml_find_attribute (attributes, "size")->value;