[PATCH 1/7] teach sparse about -Waddress

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

 



This is used by GCC to report suspicious use of addresses.

So, reuse the same name for same or similar use.

Signed-off-by: Luc Van Oostenryck <luc.vanoostenryck@xxxxxxxxx>
---
 lib.c | 2 ++
 lib.h | 1 +
 2 files changed, 3 insertions(+)

diff --git a/lib.c b/lib.c
index 272d2c88a..f4d5760b7 100644
--- a/lib.c
+++ b/lib.c
@@ -215,6 +215,7 @@ void die(const char *fmt, ...)
 static struct token *pre_buffer_begin = NULL;
 static struct token *pre_buffer_end = NULL;
 
+int Waddress = 0;
 int Waddress_space = 1;
 int Wbitwise = 1;
 int Wcast_to_as = 0;
@@ -467,6 +468,7 @@ static const struct warning {
 	const char *name;
 	int *flag;
 } warnings[] = {
+	{ "address", &Waddress },
 	{ "address-space", &Waddress_space },
 	{ "bitwise", &Wbitwise },
 	{ "cast-to-as", &Wcast_to_as },
diff --git a/lib.h b/lib.h
index 134e56040..0bf8c97e4 100644
--- a/lib.h
+++ b/lib.h
@@ -101,6 +101,7 @@ extern void add_pre_buffer(const char *fmt, ...) FORMAT_ATTR(1);
 
 extern int preprocess_only;
 
+extern int Waddress;
 extern int Waddress_space;
 extern int Wbitwise;
 extern int Wcast_to_as;
-- 
2.12.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