This is the mail archive of the
gdb-cvs@sourceware.org
mailing list for the GDB project.
[binutils-gdb] Fix CXX invalid cast from void *.
- From: Keith Seitz <kseitz at sourceware dot org>
- To: gdb-cvs at sourceware dot org
- Date: 26 Feb 2016 20:43:07 -0000
- Subject: [binutils-gdb] Fix CXX invalid cast from void *.
https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=1ed0c2a4bbe8ad5f5404014a6351b2b74db75577
commit 1ed0c2a4bbe8ad5f5404014a6351b2b74db75577
Author: Keith Seitz <keiths@redhat.com>
Date: Fri Feb 26 12:22:24 2016 -0800
Fix CXX invalid cast from void *.
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:
---
gdb/ChangeLog | 5 +++++
gdb/rs6000-tdep.c | 2 +-
2 files changed, 6 insertions(+), 1 deletion(-)
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 <keiths@redhat.com>
+
+ * rs6000-tdep.c (rs6000_frame_cache): Explicitly cast return result
+ to avoid invalid conversion from void *.
+
2016-02-26 Yao Qi <yao.qi@linaro.org>
* 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