mirror of
https://sourceware.org/git/binutils-gdb.git
synced 2025-01-20 06:53:59 +08:00
* ldexp.c (exp_fold_tree): Ensure return value is initialized.
Tidy etree_assert case.
This commit is contained in:
parent
4f495e616d
commit
8b3d8fa8ac
@ -1,3 +1,8 @@
|
||||
2005-03-14 Alan Modra <amodra@bigpond.net.au>
|
||||
|
||||
* ldexp.c (exp_fold_tree): Ensure return value is initialized.
|
||||
Tidy etree_assert case.
|
||||
|
||||
2005-03-14 Alan Modra <amodra@bigpond.net.au>
|
||||
|
||||
* po/tr.po: Commit new Turkish translation.
|
||||
|
15
ld/ldexp.c
15
ld/ldexp.c
@ -699,7 +699,7 @@ exp_fold_tree (etree_type *tree,
|
||||
|
||||
if (tree == NULL)
|
||||
{
|
||||
result.valid_p = FALSE;
|
||||
memset (&result, 0, sizeof (result));
|
||||
return result;
|
||||
}
|
||||
|
||||
@ -711,7 +711,7 @@ exp_fold_tree (etree_type *tree,
|
||||
|
||||
case etree_rel:
|
||||
if (allocation_done != lang_final_phase_enum)
|
||||
result.valid_p = FALSE;
|
||||
memset (&result, 0, sizeof (result));
|
||||
else
|
||||
result = new_rel ((tree->rel.value
|
||||
+ tree->rel.section->output_section->vma
|
||||
@ -724,12 +724,8 @@ exp_fold_tree (etree_type *tree,
|
||||
result = exp_fold_tree (tree->assert_s.child,
|
||||
current_section,
|
||||
allocation_done, dot, dotp);
|
||||
if (result.valid_p)
|
||||
{
|
||||
if (! result.value)
|
||||
einfo ("%X%P: %s\n", tree->assert_s.message);
|
||||
return result;
|
||||
}
|
||||
if (result.valid_p && !result.value)
|
||||
einfo ("%X%P: %s\n", tree->assert_s.message);
|
||||
break;
|
||||
|
||||
case etree_unary:
|
||||
@ -787,6 +783,8 @@ exp_fold_tree (etree_type *tree,
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
memset (&result, 0, sizeof (result));
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -839,6 +837,7 @@ exp_fold_tree (etree_type *tree,
|
||||
|
||||
default:
|
||||
FAIL ();
|
||||
memset (&result, 0, sizeof (result));
|
||||
break;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user