[PATCH] Add missing checks for Waddress-space

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

 



Some of these are missing in evaluate.c. Maybe we should change the
option to not consider address space at all, if unset. It would be much
easier to make attribute_address_space() ignore it.

Signed-off-by: Martin Nagy <nagy.martin@xxxxxxxxx>
---
 evaluate.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/evaluate.c b/evaluate.c
index 5c3812e..be7a17c 100644
--- a/evaluate.c
+++ b/evaluate.c
@@ -1149,7 +1149,7 @@ static struct symbol *evaluate_conditional_expression(struct expression *expr)
 			goto Err;
 		}
 		/* OK, it's pointer on pointer */
-		if (ltype->ctype.as != rtype->ctype.as) {
+		if (Waddress_space && ltype->ctype.as != rtype->ctype.as) {
 			typediff = "different address spaces";
 			goto Err;
 		}
@@ -1339,7 +1339,7 @@ static int compatible_assignment_types(struct expression *expr, struct symbol *t
 			 * we do not remove qualifiers from pointed to [C]
 			 * or mix address spaces [sparse].
 			 */
-			if (t->ctype.as != s->ctype.as) {
+			if (Waddress_space && t->ctype.as != s->ctype.as) {
 				typediff = "different address spaces";
 				goto Err;
 			}
-- 
1.6.0.6

--
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