darwin-driver.c (darwin_driver_init): Const-correctness fixes for first_period and...
authorJeff Law <law@redhat.com>
Tue, 3 Jan 2017 05:36:40 +0000 (22:36 -0700)
committerJeff Law <law@gcc.gnu.org>
Tue, 3 Jan 2017 05:36:40 +0000 (22:36 -0700)
* config/darwin-driver.c (darwin_driver_init): Const-correctness
fixes for first_period and second_period variables.

From-SVN: r244010

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

index 31aac2bdbf15c418bcac4e24f58a1621051f6152..698277a178861ec5263572ca3c232f0f8f79298b 100644 (file)
@@ -1,3 +1,8 @@
+2017-01-02  Jeff Law  <law@redhat.com>
+
+       * config/darwin-driver.c (darwin_driver_init): Const-correctness
+       fixes for first_period and second_period variables.
+
 2017-01-02  Uros Bizjak  <ubizjak@gmail.com>
 
        PR target/78967
index 0c4f0cd1b0d37bf9a12fbb0666fccc0a4e4dcc32..e3ed79d14dd115a216e0a6ed56c0e348228936d6 100644 (file)
@@ -299,10 +299,10 @@ darwin_driver_init (unsigned int *decoded_options_count,
   if (vers_string != NULL)
     {
       char *asm_major = NULL;
-      char *first_period = strchr(vers_string, '.');
+      const char *first_period = strchr(vers_string, '.');
       if (first_period != NULL)
        {
-         char *second_period = strchr(first_period+1, '.');
+         const char *second_period = strchr(first_period+1, '.');
          if (second_period  != NULL)
            asm_major = xstrndup (vers_string, second_period-vers_string);
          else