Add -Wno-address-space
PATCH RESEND 1/3 Add -Wno-address-space
Add the ability to turn off address-space mismatch warnings using -Wno-address-space, helpful when attempting to track down a particular class of warnings only without losing them amongst others. Address space checking defaults to on, so this does not change the default behavior of sparse.
Signed-off-by Josh Triplett <[email protected]>
--- evaluate.c | 2 +- lib.c | 2 ++ lib.h | 1 + 3 files changed, 4 insertions(+), 1 deletions(-)
evaluate.c +1 -1
@@ -681,7 +681,7 @@ const char * type_difference(struct symbreturn "different base types" ;/* Must be same address space to be comparable */ -if (as1 != as2) +if (Waddress_space && as1 != as2)return "different address spaces" ;/* Ignore differences in storage types or addressability */
lib.c +2 -0
@@ -178,6 +178,7 @@ int Wcast_to_address_space = 0;int Wdecl =0 ;int Wtransparent_union =1 ;int Wshadow =0 ; +int Waddress_space =1 ;int preprocess_only;char *include;int include_fd =-1 ;
@@ -323,6 +324,7 @@ static const struct warning { { "context", &Wcontext }, { "transparent-union", &Wtransparent_union }, { "shadow", &Wshadow }, + { "address-space", &Waddress_space }, };
lib.h +1 -0
@@ -77,6 +77,7 @@ extern int Wdefault_bitfield_sign;extern int Wundefined_preprocessor;extern int Wbitwise, Wtypesign, Wcontext;extern int Wtransparent_union; +extern int Waddress_space;extern int Wcast_to_address_space;extern int Wdecl;extern int Wone_bit_signed_bitfield;
Signature · 1 line
1.4.1.1