diff options
Diffstat (limited to 'gdb/xml-support.c')
-rw-r--r-- | gdb/xml-support.c | 50 |
1 files changed, 29 insertions, 21 deletions
diff --git a/gdb/xml-support.c b/gdb/xml-support.c index 211f7457bb2..e3d57d16463 100644 --- a/gdb/xml-support.c +++ b/gdb/xml-support.c @@ -83,7 +83,7 @@ struct gdb_xml_parser static void gdb_xml_body_text (void *data, const XML_Char *text, int length) { - struct gdb_xml_parser *parser = data; + struct gdb_xml_parser *parser = (struct gdb_xml_parser *) data; struct scope_level *scope = VEC_last (scope_level_s, parser->scopes); if (parser->error.reason < 0) @@ -156,7 +156,7 @@ xml_find_attribute (VEC(gdb_xml_value_s) *attributes, const char *name) static void gdb_xml_values_cleanup (void *data) { - VEC(gdb_xml_value_s) **values = data; + VEC(gdb_xml_value_s) **values = (VEC(gdb_xml_value_s) **) data; struct gdb_xml_value *value; int ix; @@ -173,7 +173,7 @@ static void gdb_xml_start_element (void *data, const XML_Char *name, const XML_Char **attrs) { - struct gdb_xml_parser *parser = data; + struct gdb_xml_parser *parser = (struct gdb_xml_parser *) data; struct scope_level *scope; struct scope_level new_scope; const struct gdb_xml_element *element; @@ -312,7 +312,7 @@ static void gdb_xml_start_element_wrapper (void *data, const XML_Char *name, const XML_Char **attrs) { - struct gdb_xml_parser *parser = data; + struct gdb_xml_parser *parser = (struct gdb_xml_parser *) data; if (parser->error.reason < 0) return; @@ -337,7 +337,7 @@ gdb_xml_start_element_wrapper (void *data, const XML_Char *name, static void gdb_xml_end_element (void *data, const XML_Char *name) { - struct gdb_xml_parser *parser = data; + struct gdb_xml_parser *parser = (struct gdb_xml_parser *) data; struct scope_level *scope = VEC_last (scope_level_s, parser->scopes); const struct gdb_xml_element *element; unsigned int seen; @@ -395,7 +395,7 @@ gdb_xml_end_element (void *data, const XML_Char *name) static void gdb_xml_end_element_wrapper (void *data, const XML_Char *name) { - struct gdb_xml_parser *parser = data; + struct gdb_xml_parser *parser = (struct gdb_xml_parser *) data; if (parser->error.reason < 0) return; @@ -419,7 +419,7 @@ gdb_xml_end_element_wrapper (void *data, const XML_Char *name) static void gdb_xml_cleanup (void *arg) { - struct gdb_xml_parser *parser = arg; + struct gdb_xml_parser *parser = (struct gdb_xml_parser *) arg; struct scope_level *scope; int ix; @@ -489,7 +489,8 @@ gdb_xml_fetch_external_entity (XML_Parser expat_parser, const XML_Char *systemId, const XML_Char *publicId) { - struct gdb_xml_parser *parser = XML_GetUserData (expat_parser); + struct gdb_xml_parser *parser + = (struct gdb_xml_parser *) XML_GetUserData (expat_parser); XML_Parser entity_parser; const char *text; enum XML_Status status; @@ -689,10 +690,12 @@ gdb_xml_parse_attr_enum (struct gdb_xml_parser *parser, const struct gdb_xml_attribute *attribute, const char *value) { - const struct gdb_xml_enum *enums = attribute->handler_data; + const struct gdb_xml_enum *enums + = (const struct gdb_xml_enum *) attribute->handler_data; void *ret; - for (enums = attribute->handler_data; enums->name != NULL; enums++) + for (enums = (const struct gdb_xml_enum *) attribute->handler_data; + enums->name != NULL; enums++) if (strcasecmp (enums->name, value) == 0) break; @@ -754,8 +757,9 @@ xinclude_start_include (struct gdb_xml_parser *parser, const struct gdb_xml_element *element, void *user_data, VEC(gdb_xml_value_s) *attributes) { - struct xinclude_parsing_data *data = user_data; - char *href = xml_find_attribute (attributes, "href")->value; + struct xinclude_parsing_data *data + = (struct xinclude_parsing_data *) user_data; + char *href = (char *) xml_find_attribute (attributes, "href")->value; struct cleanup *back_to; char *text, *output; @@ -789,7 +793,8 @@ xinclude_end_include (struct gdb_xml_parser *parser, const struct gdb_xml_element *element, void *user_data, const char *body_text) { - struct xinclude_parsing_data *data = user_data; + struct xinclude_parsing_data *data + = (struct xinclude_parsing_data *) user_data; data->skip_depth--; } @@ -797,8 +802,9 @@ xinclude_end_include (struct gdb_xml_parser *parser, static void XMLCALL xml_xinclude_default (void *data_, const XML_Char *s, int len) { - struct gdb_xml_parser *parser = data_; - struct xinclude_parsing_data *data = parser->user_data; + struct gdb_xml_parser *parser = (struct gdb_xml_parser *) data_; + struct xinclude_parsing_data *data + = (struct xinclude_parsing_data *) parser->user_data; /* If we are inside of e.g. xi:include or the DTD, don't save this string. */ @@ -815,8 +821,9 @@ xml_xinclude_start_doctype (void *data_, const XML_Char *doctypeName, const XML_Char *sysid, const XML_Char *pubid, int has_internal_subset) { - struct gdb_xml_parser *parser = data_; - struct xinclude_parsing_data *data = parser->user_data; + struct gdb_xml_parser *parser = (struct gdb_xml_parser *) data_; + struct xinclude_parsing_data *data + = (struct xinclude_parsing_data *) parser->user_data; /* Don't print out the doctype, or the contents of the DTD internal subset, if any. */ @@ -826,8 +833,9 @@ xml_xinclude_start_doctype (void *data_, const XML_Char *doctypeName, static void XMLCALL xml_xinclude_end_doctype (void *data_) { - struct gdb_xml_parser *parser = data_; - struct xinclude_parsing_data *data = parser->user_data; + struct gdb_xml_parser *parser = (struct gdb_xml_parser *) data_; + struct xinclude_parsing_data *data + = (struct xinclude_parsing_data *) parser->user_data; data->skip_depth--; } @@ -844,7 +852,7 @@ xml_xinclude_xml_decl (void *data_, const XML_Char *version, static void xml_xinclude_cleanup (void *data_) { - struct xinclude_parsing_data *data = data_; + struct xinclude_parsing_data *data = (struct xinclude_parsing_data *) data_; obstack_free (&data->obstack, NULL); xfree (data); @@ -1015,7 +1023,7 @@ obstack_xml_printf (struct obstack *obstack, const char *format, ...) char * xml_fetch_content_from_file (const char *filename, void *baton) { - const char *dirname = baton; + const char *dirname = (const char *) baton; FILE *file; struct cleanup *back_to; char *text; |