darwin-driver.c (darwin_default_min_version): Fix -Wc++-compat warnings.
authorKaveh R. Ghazi <ghazi@caip.rutgers.edu>
Tue, 1 Jul 2008 02:05:41 +0000 (02:05 +0000)
committerKaveh Ghazi <ghazi@gcc.gnu.org>
Tue, 1 Jul 2008 02:05:41 +0000 (02:05 +0000)
* config/darwin-driver.c (darwin_default_min_version): Fix
-Wc++-compat warnings.

From-SVN: r137304

gcc/ChangeLog
gcc/config/darwin-driver.c

index aaf1d083447ad96ce20837a4c41db9d7e8aabda3..a48eef216639cd5938d8cdd3df600d2b358b6bca 100644 (file)
@@ -1,3 +1,8 @@
+2008-06-30  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
+
+       * config/darwin-driver.c (darwin_default_min_version): Fix
+       -Wc++-compat warnings.
+
 2008-06-30 Uros Bizjak  <ubizjak@gmail.com>
 
        * config/i386/i386.md (*movti_rex64): Add "!" to "r" constraint
index 524f31ec04c83284dfe17d1c7e36f5a1fd649278..02226308639b3d9804ca56466970d58670157272 100644 (file)
@@ -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 *));