diff options
author | Alan Modra <amodra@gmail.com> | 2014-11-05 09:18:27 +1030 |
---|---|---|
committer | Alan Modra <amodra@gmail.com> | 2014-11-05 16:38:10 +1030 |
commit | 1ae1b8cc656639e18715829cbcd72916e86f3324 (patch) | |
tree | ba943208819e8b8a1b954fee8881510a2e6899e7 /gdb/cp-valprint.c | |
parent | ee11262d06cc6af9d900b44cb4d9af29050b375f (diff) | |
download | gdb-1ae1b8cc656639e18715829cbcd72916e86f3324.zip gdb-1ae1b8cc656639e18715829cbcd72916e86f3324.tar.gz gdb-1ae1b8cc656639e18715829cbcd72916e86f3324.tar.bz2 |
Cast result of obstack_next_free
obstack_next_free is supposed to return a void*, rather than a char*
as it does currently. Avoid warning on void* arithmetic when
obstack_next_free gets it proper return type.
* cp-valprint.c (cp_print_value_fields): Cast obstack_next_free
to char* before doing pointer arithmetic.
Diffstat (limited to 'gdb/cp-valprint.c')
-rw-r--r-- | gdb/cp-valprint.c | 4 |
1 files changed, 2 insertions, 2 deletions
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); |