[PATCH 11/348] Fix -Wshadow warnings
Joel Brobecker
brobecker@adacore.com
Thu Mar 29 18:28:00 GMT 2012
Andrey,
> 2011-11-19 Andrey Smirnov <andrew.smirnov@gmail.com>
>
> + * ada-lang.c (ada_lookup_encoded_symbol): Fix -Wshadow warnings.
> +
[...]
> ada_lookup_encoded_symbol (const char *name, const struct block *block0,
> - domain_enum namespace, struct block **block_found)
> + domain_enum namespace, struct block **found_block)
> {
> struct ada_symbol_info *candidates;
> int n_candidates;
> @@ -5064,8 +5064,8 @@ ada_lookup_encoded_symbol (const char *name, const struct block *block0,
> if (n_candidates == 0)
> return NULL;
>
> - if (block_found != NULL)
> - *block_found = candidates[0].block;
> + if (found_block != NULL)
> + *found_block = candidates[0].block;
In this case, the warning was a useful one, but I fixed it differently,
by reworking a bit the function's API.
Attached is what I checked in (tested on x86_64-linux).
--
Joel
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-Make-ada_lookup_encoded_symbol-return-a-struct-ada_s.patch
Type: text/x-diff
Size: 8166 bytes
Desc: not available
URL: <http://sourceware.org/pipermail/gdb-patches/attachments/20120329/c9700abc/attachment.bin>
More information about the Gdb-patches
mailing list