gas: rx: constify string to rx_error
Mike Frysinger
vapier@gentoo.org
Wed Oct 19 16:02:00 GMT 2011
building rx's gas code atm fails:
rx-parse.c: In function ‘rx_parse’:
rx-parse.c:3774:9: error: passing argument 1 of ‘rx_error’ discards ‘const’
qualifier from pointer target type [-Werror]
../../../gas/config/rx-defs.h:40:12: note: expected ‘char *’ but argument is of
type ‘const char *’
cc1: all warnings being treated as errors
2011-10-19 Mike Frysinger <vapier@gentoo.org>
* config/rx-defs.h (rx_error): Add const to first arg.
* config/rx-parse.y (rx_error): Likewise.
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
---
gas/config/rx-defs.h | 2 +-
gas/config/rx-parse.y | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/gas/config/rx-defs.h b/gas/config/rx-defs.h
index 868796e..5353cb9 100644
--- a/gas/config/rx-defs.h
+++ b/gas/config/rx-defs.h
@@ -37,7 +37,7 @@
extern int rx_pid_register;
extern int rx_gp_register;
-extern int rx_error (char *);
+extern int rx_error (const char *);
extern void rx_lex_init (char *, char *);
extern void rx_base1 (int);
extern void rx_base2 (int, int);
diff --git a/gas/config/rx-parse.y b/gas/config/rx-parse.y
index b473788..263e78b 100644
--- a/gas/config/rx-parse.y
+++ b/gas/config/rx-parse.y
@@ -1277,7 +1277,7 @@ rx_lex (void)
}
int
-rx_error (char * str)
+rx_error (const char * str)
{
int len;
--
1.7.6.1
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: This is a digitally signed message part.
URL: <https://sourceware.org/pipermail/binutils/attachments/20111019/4a4ed3b4/attachment.sig>
More information about the Binutils
mailing list