forked from Imagelibrary/binutils-gdb
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.
This commit is contained in:
@@ -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);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user