From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 3274 invoked by alias); 11 Apr 2013 23:01:33 -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 3252 invoked by uid 89); 11 Apr 2013 23:01:33 -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:33 +0000 Received: from int-mx02.intmail.prod.int.phx2.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id r3BN1VwR021281 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Thu, 11 Apr 2013 19:01:31 -0400 Received: from brno.lan (ovpn01.gateway.prod.ext.ams2.redhat.com [10.39.146.11]) by int-mx02.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id r3BN1UsN017070 for ; Thu, 11 Apr 2013 19:01:31 -0400 Subject: [PATCH 21/26] -Wpointer-sign: dwarf2read.c. To: gdb-patches@sourceware.org From: Pedro Alves Date: Fri, 12 Apr 2013 09:32:00 -0000 Message-ID: <20130411230130.16791.4228.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/msg00360.txt.bz2 This fixes the remaining issues necessary to make the DWARF reader -Wpointer-sign clean. The 'filename' bit should be obvious. 'constant_pool' holds the contents of an obstack, which are 'char *'. gdb_byte would work too, but it'd need more casts elsewhere, so I just chose the minimal approach. Any way would be fine with me. gdb/ 2013-04-11 Pedro Alves * dwarf2read.c (dwarf2_get_dwz_file): Add cast to const char *. (read_index_from_section): Add cast to 'char *'. --- gdb/dwarf2read.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/gdb/dwarf2read.c b/gdb/dwarf2read.c index 25dcfc9..3ed00cc 100644 --- a/gdb/dwarf2read.c +++ b/gdb/dwarf2read.c @@ -2093,7 +2093,7 @@ dwarf2_get_dwz_file (void) bfd_errmsg (bfd_get_error ())); cleanup = make_cleanup (xfree, data); - filename = data; + filename = (const char *) data; if (!IS_ABSOLUTE_PATH (filename)) { char *abs = gdb_realpath (dwarf2_per_objfile->objfile->name); @@ -2754,7 +2754,7 @@ to use the section anyway."), / (2 * sizeof (offset_type))); ++i; - map->constant_pool = addr + MAYBE_SWAP (metadata[i]); + map->constant_pool = (char *) (addr + MAYBE_SWAP (metadata[i])); return 1; }