diff options
author | Mike Frysinger <vapier@gentoo.org> | 2010-03-30 20:42:02 +0000 |
---|---|---|
committer | Mike Frysinger <vapier@gentoo.org> | 2010-03-30 20:42:02 +0000 |
commit | ff398ee4f38a388e9565a63458e90ff56aace188 (patch) | |
tree | 681e2977655ce51f565a2acd1311f8f4a895278e /sim/common/sim-watch.c | |
parent | 6bf91687eb2ee78ad7cb60708d9f66288e345e16 (diff) | |
download | fsf-binutils-gdb-ff398ee4f38a388e9565a63458e90ff56aace188.zip fsf-binutils-gdb-ff398ee4f38a388e9565a63458e90ff56aace188.tar.gz fsf-binutils-gdb-ff398ee4f38a388e9565a63458e90ff56aace188.tar.bz2 |
sim: constify watchpoint interrupt names
GCC issues warnings because const strings like "foo" are passed as char*.
sim-watch.c: In function 'watchpoint_type_to_str':
sim-watch.c:120: warning: return discards qualifiers from pointer target type
Diffstat (limited to 'sim/common/sim-watch.c')
-rw-r--r-- | sim/common/sim-watch.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/sim/common/sim-watch.c b/sim/common/sim-watch.c index df8e1b8..17125af 100644 --- a/sim/common/sim-watch.c +++ b/sim/common/sim-watch.c @@ -109,7 +109,7 @@ do_watchpoint_delete (SIM_DESC sd, return status; } -static char * +static const char * watchpoint_type_to_str (SIM_DESC sd, watchpoint_type type) { @@ -128,7 +128,7 @@ watchpoint_type_to_str (SIM_DESC sd, return NULL; } -static char * +static const char * interrupt_nr_to_str (SIM_DESC sd, int interrupt_nr) { @@ -381,7 +381,7 @@ static const OPTION watchpoint_options[] = { {NULL, no_argument, NULL, 0}, '\0', NULL, NULL, NULL } }; -static char *default_interrupt_names[] = { "int", 0, }; +static const char *default_interrupt_names[] = { "int", 0, }; @@ -425,7 +425,7 @@ sim_watchpoint_install (SIM_DESC sd) /* adjust first few entries so that they contain real documentation, the first entry includes a list of actions. */ { - char *prefix = + const char *prefix = "Watch the simulator, take ACTION in COUNT cycles (`+' for every COUNT cycles), ACTION is"; char *doc; int len = strlen (prefix) + 1; |