aboutsummaryrefslogtreecommitdiff
path: root/m68k-dis.c
diff options
context:
space:
mode:
authorblueswir1 <blueswir1@c046a42c-6fe2-441c-8c8c-71466251a162>2008-09-14 06:45:34 +0000
committerblueswir1 <blueswir1@c046a42c-6fe2-441c-8c8c-71466251a162>2008-09-14 06:45:34 +0000
commit7ccfb2eb5f9d91bdb4139cb420a3b5f8deb2f6e8 (patch)
tree29ccfd792bcd8109ef331d031b6f04d89b99b310 /m68k-dis.c
parent5d0c5750bb19212c8ecfb9660956611baf6aa861 (diff)
Fix warnings that would be caused by gcc flag -Wwrite-strings
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5206 c046a42c-6fe2-441c-8c8c-71466251a162
Diffstat (limited to 'm68k-dis.c')
-rw-r--r--m68k-dis.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/m68k-dis.c b/m68k-dis.c
index 10b8d5ba54..5a4ece5a39 100644
--- a/m68k-dis.c
+++ b/m68k-dis.c
@@ -546,13 +546,13 @@ extern const int m68k_numopcodes, m68k_numaliases;
/* Local function prototypes. */
-const char * const fpcr_names[] =
+static const char * const fpcr_names[] =
{
"", "%fpiar", "%fpsr", "%fpiar/%fpsr", "%fpcr",
"%fpiar/%fpcr", "%fpsr/%fpcr", "%fpiar/%fpsr/%fpcr"
};
-static char *const reg_names[] =
+static const char *const reg_names[] =
{
"%d0", "%d1", "%d2", "%d3", "%d4", "%d5", "%d6", "%d7",
"%a0", "%a1", "%a2", "%a3", "%a4", "%a5", "%fp", "%sp",
@@ -561,7 +561,7 @@ static char *const reg_names[] =
/* Name of register halves for MAC/EMAC.
Separate from reg_names since 'spu', 'fpl' look weird. */
-static char *const reg_half_names[] =
+static const char *const reg_half_names[] =
{
"%d0", "%d1", "%d2", "%d3", "%d4", "%d5", "%d6", "%d7",
"%a0", "%a1", "%a2", "%a3", "%a4", "%a5", "%a6", "%a7",
@@ -991,7 +991,7 @@ print_indexed (int basereg,
disassemble_info *info)
{
int word;
- static char *const scales[] = { "", ":2", ":4", ":8" };
+ static const char *const scales[] = { "", ":2", ":4", ":8" };
bfd_vma base_disp;
bfd_vma outer_disp;
char buf[40];
@@ -1106,7 +1106,7 @@ print_insn_arg (const char *d,
{
case 'c': /* Cache identifier. */
{
- static char *const cacheFieldName[] = { "nc", "dc", "ic", "bc" };
+ static const char *const cacheFieldName[] = { "nc", "dc", "ic", "bc" };
val = fetch_arg (buffer, place, 2, info);
(*info->fprintf_func) (info->stream, cacheFieldName[val]);
break;
@@ -1157,7 +1157,7 @@ print_insn_arg (const char *d,
/* FIXME: There's a problem here, different m68k processors call the
same address different names. This table can't get it right
because it doesn't know which processor it's disassembling for. */
- static const struct { char *name; int value; } names[]
+ static const struct { const char *name; int value; } names[]
= {{"%sfc", 0x000}, {"%dfc", 0x001}, {"%cacr", 0x002},
{"%tc", 0x003}, {"%itt0",0x004}, {"%itt1", 0x005},
{"%dtt0",0x006}, {"%dtt1",0x007}, {"%buscr",0x008},
@@ -1201,7 +1201,7 @@ print_insn_arg (const char *d,
case 'M':
if (place == 'h')
{
- static char *const scalefactor_name[] = { "<<", ">>" };
+ static const char *const scalefactor_name[] = { "<<", ">>" };
val = fetch_arg (buffer, place, 1, info);
(*info->fprintf_func) (info->stream, scalefactor_name[val]);
}
@@ -1633,7 +1633,7 @@ print_insn_arg (const char *d,
case '3':
{
int val = fetch_arg (buffer, place, 5, info);
- char *name = 0;
+ const char *name = 0;
switch (val)
{