From: Marcin Kościelnicki Date: Wed, 24 Feb 2016 21:00:59 +0000 (+0100) Subject: [OBV] gdb/rs6000: Fix maybe-uninitialized warning. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=338435ef105ff51e967571ad073830ec1eb5a4ab;p=binutils-gdb.git [OBV] gdb/rs6000: Fix maybe-uninitialized warning. Introduced by 657f9cde9d531c9929bef9e02a8064101d568f50. gdb/ChangeLog: * rs6000-tdep.c (rs6000_frame_cache): Initialize frame and pc to 0 to avoid spurious warnings. --- diff --git a/gdb/ChangeLog b/gdb/ChangeLog index ea9f3f42e64..95cabdb74f4 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,8 @@ +2016-02-24 Marcin Kościelnicki + + * rs6000-tdep.c (rs6000_frame_cache): Initialize frame and pc to 0 + to avoid spurious warnings. + 2016-02-24 Gary Benson * exec.c (exec_file_locate_attach): Do not attempt to diff --git a/gdb/rs6000-tdep.c b/gdb/rs6000-tdep.c index a56b8b638d2..d0c56d76cc9 100644 --- a/gdb/rs6000-tdep.c +++ b/gdb/rs6000-tdep.c @@ -3209,7 +3209,7 @@ rs6000_frame_cache (struct frame_info *this_frame, void **this_cache) enum bfd_endian byte_order = gdbarch_byte_order (gdbarch); struct rs6000_framedata fdata; int wordsize = tdep->wordsize; - CORE_ADDR func, pc; + CORE_ADDR func = 0, pc = 0; if ((*this_cache) != NULL) return (struct rs6000_frame_cache *) (*this_cache);