From 3043c80496f085a1b947377f871188af8b487ed0 Mon Sep 17 00:00:00 2001 From: "Kaveh R. Ghazi" Date: Tue, 1 Jul 2008 02:05:41 +0000 Subject: [PATCH] darwin-driver.c (darwin_default_min_version): Fix -Wc++-compat warnings. * config/darwin-driver.c (darwin_default_min_version): Fix -Wc++-compat warnings. From-SVN: r137304 --- gcc/ChangeLog | 5 +++++ gcc/config/darwin-driver.c | 4 ++-- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index aaf1d083447..a48eef21663 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +2008-06-30 Kaveh R. Ghazi + + * config/darwin-driver.c (darwin_default_min_version): Fix + -Wc++-compat warnings. + 2008-06-30 Uros Bizjak * config/i386/i386.md (*movti_rex64): Add "!" to "r" constraint diff --git a/gcc/config/darwin-driver.c b/gcc/config/darwin-driver.c index 524f31ec04c..02226308639 100644 --- a/gcc/config/darwin-driver.c +++ b/gcc/config/darwin-driver.c @@ -93,7 +93,7 @@ darwin_default_min_version (int * argc_p, char *** argv_p) && macosx_deployment_target[0]) { ++*argc_p; - *argv_p = xmalloc (sizeof (char *) * *argc_p); + *argv_p = XNEWVEC (char *, *argc_p); (*argv_p)[0] = argv[0]; (*argv_p)[1] = concat ("-mmacosx-version-min=", macosx_deployment_target, NULL); @@ -144,7 +144,7 @@ darwin_default_min_version (int * argc_p, char *** argv_p) /* Add the new flag. */ ++*argc_p; - *argv_p = xmalloc (sizeof (char *) * *argc_p); + *argv_p = XNEWVEC (char *, *argc_p); (*argv_p)[0] = argv[0]; (*argv_p)[1] = new_flag; memcpy (*argv_p + 2, argv + 1, (argc - 1) * sizeof (char *)); -- 2.30.2