From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 29027 invoked by alias); 11 Apr 2013 23:00:27 -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 28999 invoked by uid 89); 11 Apr 2013 23:00:26 -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:00:26 +0000 Received: from int-mx11.intmail.prod.int.phx2.redhat.com (int-mx11.intmail.prod.int.phx2.redhat.com [10.5.11.24]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id r3BN0PXW031969 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Thu, 11 Apr 2013 19:00:25 -0400 Received: from brno.lan (ovpn01.gateway.prod.ext.ams2.redhat.com [10.39.146.11]) by int-mx11.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id r3BN0Nc2024834 for ; Thu, 11 Apr 2013 19:00:24 -0400 Subject: [PATCH 12/26] Cast result of obstack_base to gdb_byte * in a couple spots. To: gdb-patches@sourceware.org From: Pedro Alves Date: Thu, 11 Apr 2013 23:01:00 -0000 Message-ID: <20130411230023.16791.55033.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/msg00350.txt.bz2 obstack_base returns char *. Need to cast to gdb_byte * in a couple spots. gdb/ 2013-04-11 Pedro Alves * c-lang.c (evaluate_subexp_c): Cast result of obstack_base to gdb_byte *. * linux-tdep.c (linux_make_mappings_corefile_notes): Likewise. --- gdb/c-lang.c | 2 +- gdb/linux-tdep.c | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/gdb/c-lang.c b/gdb/c-lang.c index 1c1d60b..46a6c73 100644 --- a/gdb/c-lang.c +++ b/gdb/c-lang.c @@ -658,7 +658,7 @@ evaluate_subexp_c (struct type *expect_type, struct expression *exp, if (obstack_object_size (&output) != TYPE_LENGTH (type)) error (_("Could not convert character " "constant to target character set")); - value = unpack_long (type, obstack_base (&output)); + value = unpack_long (type, (gdb_byte *) obstack_base (&output)); result = value_from_longest (type, value); } else diff --git a/gdb/linux-tdep.c b/gdb/linux-tdep.c index 9623d19..bfb6404 100644 --- a/gdb/linux-tdep.c +++ b/gdb/linux-tdep.c @@ -993,8 +993,8 @@ linux_make_mappings_corefile_notes (struct gdbarch *gdbarch, bfd *obfd, if (mapping_data.file_count != 0) { /* Write the count to the obstack. */ - pack_long (obstack_base (&data_obstack), long_type, - mapping_data.file_count); + pack_long ((gdb_byte *) obstack_base (&data_obstack), + long_type, mapping_data.file_count); /* Copy the filenames to the data obstack. */ obstack_grow (&data_obstack, obstack_base (&filename_obstack),