This is the mail archive of the
gdb-patches@sources.redhat.com
mailing list for the GDB project.
[patch] cris-elf compile with -Werror
- From: Andrew Cagney <ac131313 at cygnus dot com>
- To: gdb-patches at sources dot redhat dot com
- Date: Tue, 18 Jun 2002 12:00:27 -0400
- Subject: [patch] cris-elf compile with -Werror
Hello,
Now that the ``const char *register_name()'' problem has been fixed, the
CRIS target can be compiled with -Werror - ya!
committed,
Andrew
2002-06-18 Andrew Cagney <cagney@redhat.com>
* MAINTAINERS: Note that cris-elf target can be compiled with
-Werror.
* cris-tdep.c (cris_register_name): Make return type constant.
(cris_breakpoint_from_pc): Ditto.
Index: MAINTAINERS
===================================================================
RCS file: /cvs/src/src/gdb/MAINTAINERS,v
retrieving revision 1.182
diff -u -r1.182 MAINTAINERS
--- MAINTAINERS 13 Jun 2002 19:35:04 -0000 1.182
+++ MAINTAINERS 18 Jun 2002 15:53:47 -0000
@@ -72,7 +72,7 @@
avr --target=avr ,-Werror
Theodore A. Roth troth@verinet.com
- cris --target=cris-elf -w
+ cris --target=cris-elf ,-Werror
Orjan Friberg orjanf@axis.com
d10v --target=d10v-elf ,-Werror
Index: cris-tdep.c
===================================================================
RCS file: /cvs/src/src/gdb/cris-tdep.c,v
retrieving revision 1.16
diff -u -r1.16 cris-tdep.c
--- cris-tdep.c 14 Jun 2002 22:55:40 -0000 1.16
+++ cris-tdep.c 18 Jun 2002 15:53:49 -0000
@@ -762,7 +762,7 @@
adjusts pcptr (if necessary) to point to the actual memory location where
the breakpoint should be inserted. */
-unsigned char *
+const unsigned char *
cris_breakpoint_from_pc (CORE_ADDR *pcptr, int *lenptr)
{
static unsigned char break_insn[] = {0x38, 0xe9};
@@ -995,7 +995,7 @@
/* Return the name of register regno as a string. Return NULL for an invalid or
unimplemented register. */
-char *
+const char *
cris_register_name (int regno)
{
static char *cris_genreg_names[] =