From: Jeff Law Date: Tue, 3 Jan 2017 05:36:40 +0000 (-0700) Subject: darwin-driver.c (darwin_driver_init): Const-correctness fixes for first_period and... X-Git-Tag: basepoints/gcc-8~2074 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=ce005f353d9620a3feb3a7691000ecdd93e81d92;p=thirdparty%2Fgcc.git 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 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 31aac2bdbf15..698277a17886 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +2017-01-02 Jeff Law + + * config/darwin-driver.c (darwin_driver_init): Const-correctness + fixes for first_period and second_period variables. + 2017-01-02 Uros Bizjak PR target/78967 diff --git a/gcc/config/darwin-driver.c b/gcc/config/darwin-driver.c index 0c4f0cd1b0d3..e3ed79d14dd1 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