aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorJeff Law <law@redhat.com>2017-01-02 22:36:40 -0700
committerJeff Law <law@gcc.gnu.org>2017-01-02 22:36:40 -0700
commitce005f353d9620a3feb3a7691000ecdd93e81d92 (patch)
treede1090ca451e65d923edd6bc3077d501e5412ecc /gcc
parent755be849167a869a6f22ba6c56a20641015aa48e (diff)
downloadgcc-ce005f353d9620a3feb3a7691000ecdd93e81d92.zip
gcc-ce005f353d9620a3feb3a7691000ecdd93e81d92.tar.gz
gcc-ce005f353d9620a3feb3a7691000ecdd93e81d92.tar.bz2
darwin-driver.c (darwin_driver_init): Const-correctness fixes for first_period and second_period variables.
* config/darwin-driver.c (darwin_driver_init): Const-correctness fixes for first_period and second_period variables. From-SVN: r244010
Diffstat (limited to 'gcc')
-rw-r--r--gcc/ChangeLog5
-rw-r--r--gcc/config/darwin-driver.c4
2 files changed, 7 insertions, 2 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 31aac2b..698277a 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -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
diff --git a/gcc/config/darwin-driver.c b/gcc/config/darwin-driver.c
index 0c4f0cd..e3ed79d 100644
--- a/gcc/config/darwin-driver.c
+++ b/gcc/config/darwin-driver.c
@@ -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