From patchwork Fri Feb 26 20:42:50 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Keith Seitz X-Patchwork-Id: 11121 Received: (qmail 93605 invoked by alias); 26 Feb 2016 20:42:54 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org Delivered-To: mailing list gdb-patches@sourceware.org Received: (qmail 93581 invoked by uid 89); 26 Feb 2016 20:42:53 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.9 required=5.0 tests=BAYES_00, RP_MATCHES_RCVD, SPF_HELO_PASS autolearn=ham version=3.3.2 spammy=HContent-Transfer-Encoding:8bit X-HELO: mx1.redhat.com Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES256-GCM-SHA384 encrypted) ESMTPS; Fri, 26 Feb 2016 20:42:52 +0000 Received: from int-mx14.intmail.prod.int.phx2.redhat.com (int-mx14.intmail.prod.int.phx2.redhat.com [10.5.11.27]) by mx1.redhat.com (Postfix) with ESMTPS id 3F5EA1E2A for ; Fri, 26 Feb 2016 20:42:51 +0000 (UTC) Received: from valrhona.uglyboxes.com (ovpn01.gateway.prod.ext.phx2.redhat.com [10.5.9.1]) by int-mx14.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id u1QKgoOn001541 for ; Fri, 26 Feb 2016 15:42:51 -0500 From: Keith Seitz To: gdb-patches@sourceware.org Subject: [OB PATCH] Fix CXX invalid cast from void *. Date: Fri, 26 Feb 2016 12:42:50 -0800 Message-Id: <1456519370-11865-1-git-send-email-keiths@redhat.com> MIME-Version: 1.0 X-IsSubscribed: yes This is an obvious patch to fix the following build error seen with --enable-build-with-cxx: ../../src/gdb/rs6000-tdep.c: In function ‘rs6000_frame_cache* rs6000_frame_cache(frame_info*, void**)’: ../../src/gdb/rs6000-tdep.c:3242:15: error: invalid conversion from ‘void*’ to ‘rs6000_frame_cache*’ [-fpermissive] return (*this_cache); ~^~~~~~~~~~~~ gdb/ChangeLog * rs6000-tdep.c (rs6000_frame_cache): Explicitly cast return result to avoid invalid conversion from void *. diff --git a/gdb/ChangeLog b/gdb/ChangeLog index e45b87d..bcbaacf 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,8 @@ +2016-02-26 Keith Seitz + + * rs6000-tdep.c (rs6000_frame_cache): Explicitly cast return result + to avoid invalid conversion from void *. + 2016-02-26 Yao Qi * arm-tdep.c (arm_record_exreg_ld_st_insn): Set 'single_reg' diff --git a/gdb/rs6000-tdep.c b/gdb/rs6000-tdep.c index d0c56d7..c2b6638 100644 --- a/gdb/rs6000-tdep.c +++ b/gdb/rs6000-tdep.c @@ -3239,7 +3239,7 @@ rs6000_frame_cache (struct frame_info *this_frame, void **this_cache) { if (ex.error != NOT_AVAILABLE_ERROR) throw_exception (ex); - return (*this_cache); + return (struct rs6000_frame_cache *) (*this_cache); } END_CATCH