[PATCH 2/4] remove unused struct access_data::pos

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



The field 'struct position pos' present in struct access_data
is initialized at 2 places but is never used.

Remove this unneeded field.

Signed-off-by: Luc Van Oostenryck <luc.vanoostenryck@xxxxxxxxx>
---
 linearize.c | 4 ----
 1 file changed, 4 deletions(-)

diff --git a/linearize.c b/linearize.c
index 1173b5b6a..8f5ecdfbb 100644
--- a/linearize.c
+++ b/linearize.c
@@ -881,7 +881,6 @@ struct access_data {
 	struct symbol *type;		// ctype
 	pseudo_t address;		// pseudo containing address ..
 	unsigned int offset;		// byte offset
-	struct position pos;
 };
 
 static int linearize_simple_address(struct entrypoint *ep,
@@ -926,7 +925,6 @@ static int linearize_address_gen(struct entrypoint *ep,
 
 	if (!ctype)
 		return 0;
-	ad->pos = expr->pos;
 	ad->type = ctype;
 	if (expr->type == EXPR_PREOP && expr->op == '*')
 		return linearize_simple_address(ep, expr->unop, ad);
@@ -1851,8 +1849,6 @@ static pseudo_t linearize_one_symbol(struct entrypoint *ep, struct symbol *sym)
 		// only the existing fields need to be initialized.
 		// FIXME: this init the whole aggregate even if
 		// all fields arelater  explicitely initialized.
-		struct expression *expr = sym->initializer;
-		ad.pos = expr->pos;
 		ad.type = sym;
 		ad.address = symbol_pseudo(ep, sym);
 		linearize_store_gen(ep, value_pseudo(0), &ad);
-- 
2.18.0

--
To unsubscribe from this list: send the line "unsubscribe linux-sparse" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Newbies FAQ]     [LKML]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Trinity Fuzzer Tool]

  Powered by Linux