[PATCH RESEND] Turn on -Wcontext by default

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

 



Context checking currently requires explicitly passing the -Wcontext option.
In a Linux build, this requires passing CF=-Wcontext.  Thus, running people
running sparse over Linux or other software in the default way will not see
context warnings.  Change this by enabling -Wcontext.

While context checking does generate false positives, due to both missing
annotations on kernel functions and insufficiently clever checking in sparse,
the context warnings still do provide useful information and help track down
real bugs.  Furthermore, showing these warnings by default may incite more
people to add annotations or enhance sparse.  As a last resort, -Wno-context
will still work.

Signed-off-by: Josh Triplett <josh@xxxxxxxxxxxxxxx>
---
 lib.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/lib.c b/lib.c
index cd46e03..c89ac75 100644
--- a/lib.c
+++ b/lib.c
@@ -179,7 +179,7 @@ int Wone_bit_signed_bitfield = 1;
 int Wcast_truncate = 1;
 int Wbitwise = 0;
 int Wtypesign = 0;
-int Wcontext = 0;
+int Wcontext = 1;
 int Wundefined_preprocessor = 0;
 int Wptr_subtraction_blows = 0;
 int Wcast_to_address_space = 0;
-- 
1.4.1.1


-
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