-Wpointer-sign: ada-lang.c, ada-tasks.c.
authorPedro Alves <palves@redhat.com>
Fri, 19 Apr 2013 15:35:58 +0000 (15:35 +0000)
committerPedro Alves <palves@redhat.com>
Fri, 19 Apr 2013 15:35:58 +0000 (15:35 +0000)
We're reading strings using the target memory access routines, which
work with raw bytes, so we need a couple casts.

gdb/
2013-04-19  Pedro Alves  <palves@redhat.com>

* ada-lang.c (print_it_exception): Add cast to gdb_byte *.
* ada-tasks.c (read_fat_string_value): Likewise.

gdb/ChangeLog
gdb/ada-lang.c
gdb/ada-tasks.c

index 61fba01d70a4ac0f7a055bc2745dc5469635ca2d..c265d247f49863a0fbaef60dff1da28516bac527 100644 (file)
@@ -1,3 +1,8 @@
+2013-04-19  Pedro Alves  <palves@redhat.com>
+
+       * ada-lang.c (print_it_exception): Add cast to gdb_byte *.
+       * ada-tasks.c (read_fat_string_value): Likewise.
+
 2013-04-19  Pedro Alves  <palves@redhat.com>
 
        * dwarf2-frame.c (execute_cfa_program): Make 'bytes_read' local
index 4d07d4ded90c489a1143bb8df98efd89a848a64c..fdfc0b46dbaeaf14f7010e38193da87d783cee7b 100644 (file)
@@ -11532,7 +11532,8 @@ print_it_exception (enum exception_catchpoint_kind ex, bpstat bs)
 
          if (addr != 0)
            {
-             read_memory (addr, exception_name, sizeof (exception_name) - 1);
+             read_memory (addr, (gdb_byte *) exception_name,
+                          sizeof (exception_name) - 1);
              exception_name [sizeof (exception_name) - 1] = '\0';
            }
          else
index b0835f6615387538d4b97baadc2970044797ff06..c5c74910b1fcce465a514579e3e36910cbe062b1 100644 (file)
@@ -433,7 +433,7 @@ read_fat_string_value (char *dest, struct value *val, int max_len)
 
   /* Extract LEN characters from the fat string.  */
   array_val = value_ind (value_field (val, array_fieldno));
-  read_memory (value_address (array_val), dest, len);
+  read_memory (value_address (array_val), (gdb_byte *) dest, len);
 
   /* Add the NUL character to close the string.  */
   dest[len] = '\0';
This page took 0.034591 seconds and 4 git commands to generate.