This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
[PATCH, obvious] nds32: constify ptr_arg
- From: tbsaunde+binutils at tbsaunde dot org
- To: binutils at sourceware dot org
- Cc: Trevor Saunders <tbsaunde+binutils at tbsaunde dot org>
- Date: Sun, 5 Jun 2016 16:19:54 -0400
- Subject: [PATCH, obvious] nds32: constify ptr_arg
- Authentication-results: sourceware.org; auth=none
From: Trevor Saunders <tbsaunde+binutils@tbsaunde.org>
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.
built cross to nds32be-elf, committing as obvious.
Thanks!
Trev
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 *.
---
gas/config/tc-nds32.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
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)
{
--
2.7.4