Fix CXX invalid cast from void *.
authorKeith Seitz <keiths@redhat.com>
Fri, 26 Feb 2016 20:22:24 +0000 (12:22 -0800)
committerKeith Seitz <keiths@redhat.com>
Fri, 26 Feb 2016 20:42:28 +0000 (12:42 -0800)
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 *.

gdb/ChangeLog
gdb/rs6000-tdep.c

index e45b87d..bcbaacf 100644 (file)
@@ -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'
index d0c56d7..c2b6638 100644 (file)
@@ -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