From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 4744 invoked by alias); 11 Apr 2013 23:01:48 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org Received: (qmail 4717 invoked by uid 89); 11 Apr 2013 23:01:48 -0000 X-Spam-SWARE-Status: No, score=-8.9 required=5.0 tests=AWL,BAYES_00,KHOP_RCVD_UNTRUST,KHOP_THREADED,RCVD_IN_DNSWL_HI,RCVD_IN_HOSTKARMA_W,RP_MATCHES_RCVD,SPF_HELO_PASS autolearn=ham version=3.3.1 Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.84/v0.84-167-ge50287c) with ESMTP; Thu, 11 Apr 2013 23:01:48 +0000 Received: from int-mx10.intmail.prod.int.phx2.redhat.com (int-mx10.intmail.prod.int.phx2.redhat.com [10.5.11.23]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id r3BN1kxB002205 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Thu, 11 Apr 2013 19:01:46 -0400 Received: from brno.lan (ovpn01.gateway.prod.ext.ams2.redhat.com [10.39.146.11]) by int-mx10.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id r3BN1i3R012327 for ; Thu, 11 Apr 2013 19:01:46 -0400 Subject: [PATCH 23/26] -Wpointer-sign: ada-lang.c, ada-tasks.c. To: gdb-patches@sourceware.org From: Pedro Alves Date: Fri, 12 Apr 2013 10:01:00 -0000 Message-ID: <20130411230144.16791.57747.stgit@brno.lan> In-Reply-To: <20130411225847.16791.29283.stgit@brno.lan> References: <20130411225847.16791.29283.stgit@brno.lan> User-Agent: StGit/0.16 MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit X-SW-Source: 2013-04/txt/msg00362.txt.bz2 We're reading strings using the target memory access routines, which work with raw bytes, so we need a couple casts. gdb/ 2013-04-11 Pedro Alves * ada-lang.c (print_it_exception): Add cast to gdb_byte *. * ada-tasks.c (read_fat_string_value): Likewise. --- gdb/ada-lang.c | 3 ++- gdb/ada-tasks.c | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/gdb/ada-lang.c b/gdb/ada-lang.c index 4d07d4d..fdfc0b4 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 b0835f6..c5c7491 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';