From c714b42695bbe7ff5e22aae2f91f9071b3ecf601 Mon Sep 17 00:00:00 2001 From: Pedro Alves Date: Fri, 19 Apr 2013 15:35:58 +0000 Subject: [PATCH] -Wpointer-sign: ada-lang.c, ada-tasks.c. 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 * ada-lang.c (print_it_exception): Add cast to gdb_byte *. * ada-tasks.c (read_fat_string_value): Likewise. --- gdb/ChangeLog | 5 +++++ gdb/ada-lang.c | 3 ++- gdb/ada-tasks.c | 2 +- 3 files changed, 8 insertions(+), 2 deletions(-) diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 61fba01d70a..c265d247f49 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,8 @@ +2013-04-19 Pedro Alves + + * ada-lang.c (print_it_exception): Add cast to gdb_byte *. + * ada-tasks.c (read_fat_string_value): Likewise. + 2013-04-19 Pedro Alves * dwarf2-frame.c (execute_cfa_program): Make 'bytes_read' local diff --git a/gdb/ada-lang.c b/gdb/ada-lang.c index 4d07d4ded90..fdfc0b46dba 100644 --- a/gdb/ada-lang.c +++ b/gdb/ada-lang.c @@ -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 diff --git a/gdb/ada-tasks.c b/gdb/ada-tasks.c index b0835f66153..c5c74910b1f 100644 --- a/gdb/ada-tasks.c +++ b/gdb/ada-tasks.c @@ -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'; -- 2.30.2