X-Git-Url: http://drtracing.org/?a=blobdiff_plain;f=libiberty%2Fobstack.c;h=ff875c41f566b8cafdac033f7a3572b2280bfd47;hb=7243d0118af6f72e3e72db1eb66941fec4530963;hp=9f34da1164bd4a6a3331c01eb66b9c9522b48226;hpb=e9f40d7d68ecc03c8c32ec0acd07c35359fdb4a3;p=deliverable%2Fbinutils-gdb.git diff --git a/libiberty/obstack.c b/libiberty/obstack.c index 9f34da1164..ff875c41f5 100644 --- a/libiberty/obstack.c +++ b/libiberty/obstack.c @@ -1,5 +1,5 @@ /* obstack.c - subroutines used implicitly by object stack macros - Copyright (C) 1988-2015 Free Software Foundation, Inc. + Copyright (C) 1988-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or @@ -138,9 +138,10 @@ _obstack_begin_worker (struct obstack *h, h->chunk_size = size; h->alignment_mask = alignment - 1; - chunk = h->chunk = call_chunkfun (h, h->chunk_size); + chunk = (struct _obstack_chunk *) call_chunkfun (h, h->chunk_size); if (!chunk) (*obstack_alloc_failed_handler) (); + h->chunk = chunk; h->next_free = h->object_base = __PTR_ALIGN ((char *) chunk, chunk->contents, alignment - 1); h->chunk_limit = chunk->limit = (char *) chunk + h->chunk_size; @@ -202,7 +203,7 @@ _obstack_newchunk (struct obstack *h, _OBSTACK_SIZE_T length) /* Allocate and initialize the new chunk. */ if (obj_size <= sum1 && sum1 <= sum2) - new_chunk = call_chunkfun (h, new_size); + new_chunk = (struct _obstack_chunk *) call_chunkfun (h, new_size); if (!new_chunk) (*obstack_alloc_failed_handler)(); h->chunk = new_chunk;