diff options
author | Trevor Saunders <tbsaunde+binutils@tbsaunde.org> | 2016-05-28 17:57:44 -0400 |
---|---|---|
committer | Trevor Saunders <tbsaunde+binutils@tbsaunde.org> | 2016-06-05 16:21:33 -0400 |
commit | 73a229c755847ada2425c767ce15c40cc5801b6b (patch) | |
tree | 0c69bb9fdcf8571af4561ad4b050105bbe2c4eea /gas | |
parent | 1704fca7dab2f0c1d64ccdade61275de4ef41e94 (diff) | |
download | fsf-binutils-gdb-73a229c755847ada2425c767ce15c40cc5801b6b.zip fsf-binutils-gdb-73a229c755847ada2425c767ce15c40cc5801b6b.tar.gz fsf-binutils-gdb-73a229c755847ada2425c767ce15c40cc5801b6b.tar.bz2 |
nds32: constify ptr_arg
it points to the result of strchr on a const char *, so it aliases
something that is const. Further its only passed to a function that expects a
const char *, so there's no reason for it to not be const.
gas/ChangeLog:
2016-06-05 Trevor Saunders <tbsaunde+binutils@tbsaunde.org>
* config/tc-nds32.c (nds32_parse_option): Make the type of ptr_arg
const char *.
Diffstat (limited to 'gas')
-rw-r--r-- | gas/ChangeLog | 5 | ||||
-rw-r--r-- | gas/config/tc-nds32.c | 2 |
2 files changed, 6 insertions, 1 deletions
diff --git a/gas/ChangeLog b/gas/ChangeLog index 8e4d967..cae94da 100644 --- a/gas/ChangeLog +++ b/gas/ChangeLog @@ -1,3 +1,8 @@ +2016-06-05 Trevor Saunders <tbsaunde+binutils@tbsaunde.org> + + * config/tc-nds32.c (nds32_parse_option): Make the type of ptr_arg + const char *. + 2016-06-03 Peter Bergner <bergner@vnet.ibm.com> PR binutils/20196 diff --git a/gas/config/tc-nds32.c b/gas/config/tc-nds32.c index 888e8aa..1d1a80e 100644 --- a/gas/config/tc-nds32.c +++ b/gas/config/tc-nds32.c @@ -3193,7 +3193,7 @@ nds32_parse_option (int c, const char *arg) { struct nds32_parse_option_table *coarse_tune; struct nds32_set_option_table *fine_tune; - char *ptr_arg = NULL; + const char *ptr_arg = NULL; switch (c) { |