diff options
Diffstat (limited to 'gcc/collect2.c')
| -rw-r--r-- | gcc/collect2.c | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/gcc/collect2.c b/gcc/collect2.c index 531b1228855..dbd580606d4 100644 --- a/gcc/collect2.c +++ b/gcc/collect2.c @@ -846,9 +846,9 @@ main (int argc, char **argv) /* Do not invoke xcalloc before this point, since locale needs to be set first, in case a diagnostic is issued. */ - ld1 = (const char **)(ld1_argv = xcalloc(sizeof (char *), argc+4)); - ld2 = (const char **)(ld2_argv = xcalloc(sizeof (char *), argc+11)); - object = (const char **)(object_lst = xcalloc(sizeof (char *), argc)); + ld1 = (const char **)(ld1_argv = XCNEWVEC (char *, argc+4)); + ld2 = (const char **)(ld2_argv = XCNEWVEC (char *, argc+11)); + object = (const char **)(object_lst = XCNEWVEC (char *, argc)); #ifdef DEBUG debug = 1; @@ -875,7 +875,7 @@ main (int argc, char **argv) #endif obstack_begin (&temporary_obstack, 0); - temporary_firstobj = obstack_alloc (&temporary_obstack, 0); + temporary_firstobj = (char *) obstack_alloc (&temporary_obstack, 0); #ifndef HAVE_LD_DEMANGLE current_demangling_style = auto_demangling; @@ -893,7 +893,7 @@ main (int argc, char **argv) -fno-exceptions -w */ num_c_args += 5; - c_ptr = (const char **) (c_argv = xcalloc (sizeof (char *), num_c_args)); + c_ptr = (const char **) (c_argv = XCNEWVEC (char *, num_c_args)); if (argc < 2) fatal ("no arguments"); @@ -1676,7 +1676,8 @@ static long sequence_number = 0; static void add_to_list (struct head *head_ptr, const char *name) { - struct id *newid = xcalloc (sizeof (struct id) + strlen (name), 1); + struct id *newid + = (struct id *) xcalloc (sizeof (struct id) + strlen (name), 1); struct id *p; strcpy (newid->name, name); |

