The recent libiberty import of upstream obstack.h (
314dee8ea9be) makes
obstack_base return a 'void *', with the consequence that a few places
in gdb need a (char *) cast.
gdb/ChangeLog:
2015-11-18 Simon Marchi <simon.marchi@ericsson.com>
Pedro Alves <palves@redhat.com>
* break-catch-sig.c (signal_catchpoint_print_one): Add cast.
* c-exp.y (parse_string_or_char, yylex): Add casts.
* c-lang.c (evaluate_subexp_c): Add casts.
* d-exp.y (parse_string_or_char, yylex): Add casts.
* go-exp.y (parse_string_or_char, build_packaged_name): Add casts.
* p-valprint.c (pascal_object_print_value_fields): Add casts.
* valprint.c (generic_emit_char, generic_printstr): Add casts.
2015-11-18 Simon Marchi <simon.marchi@ericsson.com>
+ Pedro Alves <palves@redhat.com>
+
+ * break-catch-sig.c (signal_catchpoint_print_one): Add cast.
+ * c-exp.y (parse_string_or_char, yylex): Add casts.
+ * c-lang.c (evaluate_subexp_c): Add casts.
+ * d-exp.y (parse_string_or_char, yylex): Add casts.
+ * go-exp.y (parse_string_or_char, build_packaged_name): Add casts.
+ * p-valprint.c (pascal_object_print_value_fields): Add casts.
+ * valprint.c (generic_emit_char, generic_printstr): Add casts.
+
+2015-11-18 Simon Marchi <simon.marchi@ericsson.com>
* valops.c (value_cstring): Constify 'ptr' parameter.
* value.h (value_cstring): Constify 'ptr' parameter.
obstack_grow (&text, name, strlen (name));
}
obstack_grow (&text, "", 1);
- ui_out_field_string (uiout, "what", obstack_base (&text));
+ ui_out_field_string (uiout, "what", (const char *) obstack_base (&text));
do_cleanups (cleanup);
}
else
++tokptr;
value->type = type;
- value->ptr = obstack_base (&tempbuf);
+ value->ptr = (char *) obstack_base (&tempbuf);
value->length = obstack_object_size (&tempbuf);
*outptr = tokptr;
obstack_grow (&name_obstack, next->value.sval.ptr,
next->value.sval.length);
- yylval.sval.ptr = obstack_base (&name_obstack);
+ yylval.sval.ptr = (const char *) obstack_base (&name_obstack);
yylval.sval.length = obstack_object_size (&name_obstack);
current.value = yylval;
current.token = classification;
obstack_object_size (&output));
}
else
- result = value_cstring (obstack_base (&output),
+ result = value_cstring ((const char *) obstack_base (&output),
obstack_object_size (&output),
type);
}
else
value->type = C_STRING;
- value->ptr = obstack_base (&tempbuf);
+ value->ptr = (char *) obstack_base (&tempbuf);
value->length = obstack_object_size (&tempbuf);
*outptr = tokptr;
obstack_grow (&name_obstack, next->value.sval.ptr,
next->value.sval.length);
- yylval.sval.ptr = obstack_base (&name_obstack);
+ yylval.sval.ptr = (char *) obstack_base (&name_obstack);
yylval.sval.length = obstack_object_size (&name_obstack);
current.token = classify_name (pstate, expression_context_block);
obstack_grow (&name_obstack, next->value.sval.ptr,
next->value.sval.length);
- yylval.sval.ptr = obstack_base (&name_obstack);
+ yylval.sval.ptr = (char *) obstack_base (&name_obstack);
yylval.sval.length = obstack_object_size (&name_obstack);
current.value = yylval;
current.token = classification;
++tokptr;
value->type = C_STRING | (quote == '\'' ? C_CHAR : 0); /*FIXME*/
- value->ptr = obstack_base (&tempbuf);
+ value->ptr = (char *) obstack_base (&tempbuf);
value->length = obstack_object_size (&tempbuf);
*outptr = tokptr;
obstack_grow_str (&name_obstack, ".");
obstack_grow (&name_obstack, name, name_len);
obstack_grow (&name_obstack, "", 1);
- result.ptr = obstack_base (&name_obstack);
+ result.ptr = (char *) obstack_base (&name_obstack);
result.length = obstack_object_size (&name_obstack) - 1;
return result;
int dont_print_statmem)
{
int i, len, n_baseclasses;
- char *last_dont_print = obstack_next_free (&dont_print_statmem_obstack);
+ char *last_dont_print
+ = (char *) obstack_next_free (&dont_print_statmem_obstack);
type = check_typedef (type);
sizeof (gdb_wchar_t), &output, translit_char);
obstack_1grow (&output, '\0');
- fputs_filtered (obstack_base (&output), stream);
+ fputs_filtered ((const char *) obstack_base (&output), stream);
do_cleanups (cleanups);
}
sizeof (gdb_wchar_t), &output, translit_char);
obstack_1grow (&output, '\0');
- fputs_filtered (obstack_base (&output), stream);
+ fputs_filtered ((const char *) obstack_base (&output), stream);
do_cleanups (cleanup);
}