Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
* [rfa] function parameter shadowed by local variable in opencl-lang.c
@ 2011-02-26 23:26 Michael Snyder
  2011-02-26 23:36 ` Michael Snyder
  0 siblings, 1 reply; 11+ messages in thread
From: Michael Snyder @ 2011-02-26 23:26 UTC (permalink / raw)
  To: gdb-patches, ken.werner

[-- Attachment #1: Type: text/plain, Size: 35 bytes --]

Probably this wasn't intentional?


[-- Attachment #2: shadow.txt --]
[-- Type: text/plain, Size: 848 bytes --]

2011-02-26  Michael Snyder  <msnyder@vmware.com>

	* opencl-lang.c (lval_func_check_synthetic_pointer): Local variable
	shadows function parameter.

Index: opencl-lang.c
===================================================================
RCS file: /cvs/src/src/gdb/opencl-lang.c,v
retrieving revision 1.7
diff -u -p -u -p -r1.7 opencl-lang.c
--- opencl-lang.c	21 Feb 2011 15:53:10 -0000	1.7
+++ opencl-lang.c	26 Feb 2011 23:19:10 -0000
@@ -318,11 +318,11 @@ lval_func_check_synthetic_pointer (const
   for (i = start; i < end; i++)
     {
       int startoffset = (i == start) ? startrest : 0;
-      int length = (i == end) ? endrest : elsize;
+      int length2 = (i == end) ? endrest : elsize;
 
       if (!value_bits_synthetic_pointer (c->val,
 					 c->indices[i] * elsize + startoffset,
-					 length))
+					 length2))
 	return 0;
     }
 

^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2011-02-28 18:41 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-02-26 23:26 [rfa] function parameter shadowed by local variable in opencl-lang.c Michael Snyder
2011-02-26 23:36 ` Michael Snyder
2011-02-28  4:57   ` Joel Brobecker
2011-02-28  5:01     ` [RFC] Compile GDB with -Wshadow? (was: "Re: [rfa] function parameter shadowed by local variable in opencl-lang.c") Joel Brobecker
2011-02-28  5:39       ` Jan Kratochvil
2011-02-28  9:09         ` Joel Brobecker
2011-02-28  9:29           ` Mark Kettenis
2011-02-28 18:15             ` [RFC] Compile GDB with -Wshadow? Michael Snyder
2011-02-28 15:48       ` Tom Tromey
2011-02-28 15:23     ` [rfa] function parameter shadowed by local variable in opencl-lang.c Ulrich Weigand
2011-02-28 18:43       ` Michael Snyder

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox