[5/8] gdb/dwarf: remove unused local variable in create_debug_type_hash_table
Checks
Commit Message
From: Simon Marchi <simon.marchi@efficios.com>
Change-Id: I40679fbe32a8a1a9cced085532c83f06affc294c
---
gdb/dwarf2/read.c | 1 -
1 file changed, 1 deletion(-)
Comments
>>>>> "Simon" == simon marchi <simon.marchi@polymtl.ca> writes:
Simon> From: Simon Marchi <simon.marchi@efficios.com>
Simon> Change-Id: I40679fbe32a8a1a9cced085532c83f06affc294c
It shouldn't really be possible to have an unused variable but I guess
is exempt since it's non-trivial?
Approved-By: Tom Tromey <tom@tromey.com>
Tom
On 3/5/25 11:03 AM, Tom Tromey wrote:
>>>>>> "Simon" == simon marchi <simon.marchi@polymtl.ca> writes:
>
> Simon> From: Simon Marchi <simon.marchi@efficios.com>
> Simon> Change-Id: I40679fbe32a8a1a9cced085532c83f06affc294c
>
> It shouldn't really be possible to have an unused variable but I guess
> is exempt since it's non-trivial?
Yeah that's my guess, I wish that compilers could be a bit smarter about
that, since they can see that the constructor and destructor of
unique_ptr doesn't have any side-effects. Perhaps some higher level
linting tools like Coverity could catch those. Anyway, not a big deal.
Simon
@@ -2574,7 +2574,6 @@ create_debug_type_hash_table (dwarf2_per_objfile *per_objfile,
end_ptr = info_ptr + section->size;
while (info_ptr < end_ptr)
{
- signatured_type_up sig_type;
struct dwo_unit *dwo_tu;
void **slot;
const gdb_byte *ptr = info_ptr;