diff options
-rw-r--r-- | gdb/ChangeLog | 2 | ||||
-rw-r--r-- | gdb/cp-valprint.c | 4 |
2 files changed, 4 insertions, 2 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog index f347b89..185d5e8 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -3,6 +3,8 @@ * charset.c (convert_between_encodings): Shrink obstack using obstack_blank_fast. * minsyms.c (install_minimal_symbols): Likewise. + * cp-valprint.c (cp_print_value_fields): Cast obstack_next_free + to char* before doing pointer arithmetic. 2014-11-04 Simon Marchi <simon.marchi@ericsson.com> diff --git a/gdb/cp-valprint.c b/gdb/cp-valprint.c index 42010c2..8f456bf 100644 --- a/gdb/cp-valprint.c +++ b/gdb/cp-valprint.c @@ -370,7 +370,7 @@ cp_print_value_fields (struct type *type, struct type *real_type, /* In effect, a pop of the printed-statics stack. */ void *free_to_ptr = - obstack_next_free (&dont_print_statmem_obstack) - + (char *) obstack_next_free (&dont_print_statmem_obstack) - (obstack_final_size - statmem_obstack_initial_size); obstack_free (&dont_print_statmem_obstack, @@ -385,7 +385,7 @@ cp_print_value_fields (struct type *type, struct type *real_type, if (obstack_final_size > stat_array_obstack_initial_size) { void *free_to_ptr = - obstack_next_free (&dont_print_stat_array_obstack) + (char *) obstack_next_free (&dont_print_stat_array_obstack) - (obstack_final_size - stat_array_obstack_initial_size); |