From: Olivier Hainque Date: Wed, 30 Jul 2008 07:44:09 +0000 (+0000) Subject: scan.c (make_sstring_space): Add explicit conversions of allocator's return value. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=473e10621f06ef6cfd82f3875224c4b82c2eb7cf;p=gcc.git scan.c (make_sstring_space): Add explicit conversions of allocator's return value. * scan.c (make_sstring_space): Add explicit conversions of allocator's return value. * fix-header.c (recognized_function): Likewise. From-SVN: r138295 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index a3efe937a23..19e2f3b0f26 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,9 @@ +2008-07-30 Olivier Hainque + + * scan.c (make_sstring_space): Add explicit conversions of + allocator's return value. + * fix-header.c (recognized_function): Likewise. + 2008-07-30 Laurent Guerby PR ada/5911 diff --git a/gcc/fix-header.c b/gcc/fix-header.c index f691e4eae70..5402e949db4 100644 --- a/gcc/fix-header.c +++ b/gcc/fix-header.c @@ -562,7 +562,10 @@ recognized_function (const cpp_token *fname, unsigned int line, int kind, /* We only have a partial function declaration, so remember that we have to add a complete prototype. */ partial_count++; - partial = obstack_alloc (&scan_file_obstack, sizeof (struct partial_proto)); + partial + = (struct partial_proto *) + obstack_alloc (&scan_file_obstack, + sizeof (struct partial_proto)); partial->line_seen = line; partial->fn = fn; fn->partial = partial; diff --git a/gcc/scan.c b/gcc/scan.c index f697d26ec02..c6d04716271 100644 --- a/gcc/scan.c +++ b/gcc/scan.c @@ -35,7 +35,7 @@ make_sstring_space (sstring *str, int count) if (new_size <= cur_size) return; - str->base = xrealloc (str->base, new_size); + str->base = (char *) xrealloc (str->base, new_size); str->ptr = str->base + cur_size; str->limit = str->base + new_size; }