This is the mail archive of the gdb-patches@sources.redhat.com mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: sh -Werror breakage


On Wed, Oct 08, 2003 at 02:31:22PM -0400, Elena Zannoni wrote:
> Corinna Vinschen writes:
>  > On Thu, Oct 02, 2003 at 04:22:50PM -0400, Andrew Cagney wrote:
>  > > Corinna, I'm seeing:
>  > > 
>  > > /home/cagney/PENDING/2003-09-28-deprecate-register-raw-size/src/gdb/sh-tdep.c:7\
>  > > 46: warning: `flt_argreg' might be used uninitialized in this function
>  > > /home/cagney/PENDING/2003-09-28-deprecate-register-raw-size/src/gdb/sh-tdep.c:7\
>  > > 51: warning: `reg_size' might be used uninitialized in this function
>  > 
>  > GCC got this wrong.  I've applied a patch to shut it up.
>  > 
>  > Corinna
>  > 
> 
> Corinna, can you post the patch?

Sure,

http://sources.redhat.com/cgi-bin/cvsweb.cgi/src/gdb/sh-tdep.c.diff?cvsroot=src&r1=1.144&r2=1.145

===================================================================
RCS file: /cvs/src/src/gdb/sh-tdep.c,v
retrieving revision 1.144
retrieving revision 1.145
diff -u -r1.144 -r1.145
--- src/gdb/sh-tdep.c	2003/10/02 10:47:05	1.144
+++ src/gdb/sh-tdep.c	2003/10/03 08:13:37	1.145
@@ -743,12 +743,12 @@
 {
   int stack_offset = 0;
   int argreg = ARG0_REGNUM;
-  int flt_argreg;
+  int flt_argreg = 0;
   int argnum;
   struct type *type;
   CORE_ADDR regval;
   char *val;
-  int len, reg_size;
+  int len, reg_size = 0;
   int pass_on_stack;
 
   /* first force sp to a 4-byte alignment */

Corinna

-- 
Corinna Vinschen
Cygwin Developer
Red Hat, Inc.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]