[PATCH v3 0/2] avoid warnings for 'bool <- restricted' casts

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

 



The goal of this series is to stop to emit a warning
when a restricted type is casted to the boolean type
as such conversion is equivalent to a comparision
againts zero for which the 'restrictness' doesn't matter.


Change since v2:
- add tests for assignment to bool type.
- add patch & tests for explicit casts

Changes since v1:
- fix forgotten adjustment of 2 existing test cases.


Luc Van Oostenryck (2):
  avoid warning on implicit 'bool <- restricted' casts
  avoid warning on explicit 'bool <- restricted' casts

 evaluate.c                        | 19 ++++++++++++++---
 validation/bool-cast-bad.c        |  4 ----
 validation/bool-cast-explicit.c   |  4 ----
 validation/bool-cast-implicit.c   |  3 ---
 validation/bool-cast-restricted.c | 43 +++++++++++++++++++++++++++++++++++++++
 5 files changed, 59 insertions(+), 14 deletions(-)
 create mode 100644 validation/bool-cast-restricted.c

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