summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorErick Ochoa <erick.ochoa@theobroma-systems.com>2020-02-21 20:52:45 +0100
committerErick Ochoa <erick.ochoa@theobroma-systems.com>2020-04-28 23:35:43 +0200
commit2aef30595a5c0b51b858c7ce9d1de5182ae77ecb (patch)
tree635c6bdfe602cc42c7f64f3490addd346af3479e
parent74f3453a1177e88cc818a7b3e3f1c5c363615e02 (diff)
Fixes warning
-rw-r--r--gcc/ipa-str-reorg-dead-field-eliminate.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/gcc/ipa-str-reorg-dead-field-eliminate.c b/gcc/ipa-str-reorg-dead-field-eliminate.c
index c5f933951ed..5480eb8e30b 100644
--- a/gcc/ipa-str-reorg-dead-field-eliminate.c
+++ b/gcc/ipa-str-reorg-dead-field-eliminate.c
@@ -671,12 +671,12 @@ print_function (cgraph_node *cnode)
dump_function_to_file (cnode->decl, dump_file, TDF_NONE);
}
-static int
+static unsigned
get_field_offset (const_tree field)
{
gcc_assert (TREE_CODE (field) == FIELD_DECL);
tree cst = byte_position (field);
- int offset = tree_to_shwi (cst);
+ unsigned offset = tree_to_uhwi (cst);
return offset;
}
@@ -2459,8 +2459,7 @@ rewrite_function_return_type (tree expr,
return;
TREE_TYPE (function_type) = (tree) *new_type_ptr;
- // Do not use
- // relayout_decl(cnode->decl);
+ // Do not use relayout_decl(cnode->decl);
tree function_type_2 = TREE_TYPE (expr);
tree function_return_type_2 = TREE_TYPE (function_type_2);
test_log ("after rewrite_function_return_type %s", indent,