Skip to content

Commit d8c57ee

Browse files
committed
libbacktrace: avoid decl-after-stmt
Signed-off-by: Johannes Schindelin <[email protected]>
1 parent c6b70b1 commit d8c57ee

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

compat/libbacktrace/dwarf.c

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3369,13 +3369,14 @@ read_referenced_name_from_attr (struct dwarf_data *ddata, struct unit *u,
33693369

33703370
if (val->encoding == ATTR_VAL_REF_INFO)
33713371
{
3372+
uint64_t offset;
33723373
struct unit *unit
33733374
= find_unit (ddata->units, ddata->units_count,
33743375
val->u.uint);
33753376
if (unit == NULL)
33763377
return NULL;
33773378

3378-
uint64_t offset = val->u.uint - unit->low_offset;
3379+
offset = val->u.uint - unit->low_offset;
33793380
return read_referenced_name (ddata, unit, offset, error_callback, data);
33803381
}
33813382

@@ -3385,13 +3386,14 @@ read_referenced_name_from_attr (struct dwarf_data *ddata, struct unit *u,
33853386

33863387
if (val->encoding == ATTR_VAL_REF_ALT_INFO)
33873388
{
3389+
uint64_t offset;
33883390
struct unit *alt_unit
33893391
= find_unit (ddata->altlink->units, ddata->altlink->units_count,
33903392
val->u.uint);
33913393
if (alt_unit == NULL)
33923394
return NULL;
33933395

3394-
uint64_t offset = val->u.uint - alt_unit->low_offset;
3396+
offset = val->u.uint - alt_unit->low_offset;
33953397
return read_referenced_name (ddata->altlink, alt_unit, offset,
33963398
error_callback, data);
33973399
}

0 commit comments

Comments
 (0)