gdb: constify remote files_info
authorMike Frysinger <vapier@gentoo.org>
Mon, 12 Apr 2010 16:04:43 +0000 (16:04 +0000)
committerMike Frysinger <vapier@gentoo.org>
Mon, 12 Apr 2010 16:04:43 +0000 (16:04 +0000)
The sim and m32r remote targets declare a local "file" variable and only
assign const strings to it before passing it to a printf() func.  So add
const markings to avoid gcc warnings like:
gdb/remote-sim.c: In function 'gdbsim_files_info':
gdb/remote-sim.c:789: warning: initialization discards qualifiers
from pointer target type

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
gdb/ChangeLog
gdb/remote-m32r-sdi.c
gdb/remote-sim.c

index 392d2ddbcfa01f6c85d8b2e27a50717054843215..865768bea92442982a5c0e50c6b6d790667dbb0e 100644 (file)
@@ -1,3 +1,8 @@
+2010-04-12  Mike Frysinger  <vapier@gentoo.org>
+
+       * remote-m32r-sdi.c (m32r_files_info): Add const to local "file" var.
+       * remote-sim.c (gdbsim_files_info): Likewise.
+
 2010-04-12  Matthew Gretton-Dann  <matthew.gretton-dann@arm.com>
 
        * arm-tdep.h (gdb_regnum): Add ARM_FPSCR_REGNUM
index be6a564c3ac7b7e0c3035c00bb0484fb1c8f612c..a74075be36f6ccffe04c8696387d8d21dbfc5ce5 100644 (file)
@@ -1020,7 +1020,7 @@ m32r_prepare_to_store (struct regcache *regcache)
 static void
 m32r_files_info (struct target_ops *target)
 {
-  char *file = "nothing";
+  const char *file = "nothing";
 
   if (exec_bfd)
     {
index 9f1adc78858e60dd3ae088043fd5616456d2c34b..53f310907176886fc9496844ecf3cff26a16310f 100644 (file)
@@ -793,7 +793,7 @@ gdbsim_xfer_inferior_memory (CORE_ADDR memaddr, gdb_byte *myaddr, int len,
 static void
 gdbsim_files_info (struct target_ops *target)
 {
-  char *file = "nothing";
+  const char *file = "nothing";
 
   if (exec_bfd)
     file = bfd_get_filename (exec_bfd);
This page took 0.029227 seconds and 4 git commands to generate.