This is the mail archive of the gdb-patches@sourceware.org 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: [PATCH 6/8] Avoid shadowing in fdwalk


On Sat, 22 Sep 2018 22:08:12 -0600
Tom Tromey <tom@tromey.com> wrote:

> -Wshadow=local caught this buglet.  fdwalk redeclares "result" in the
> inner scope, meaning that this function will always return 0, even on
> error.

Wow!

> gdb/ChangeLog
> 2018-09-22  Tom Tromey  <tom@tromey.com>
> 
> 	* common/filestuff.c (fdwalk): Remove inner declaration of
> 	"result".

This is okay.

Kevin


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