[PATCH v2 0/2] casts from AS pointers and uintptr_t

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

 



Sparse will warn on casts removing the address space of a pointer
if the destination type is not unsigned long. But uintptr_t is
better suited for this. So:
1) allow uintptr_t in such casts
2) add in the man page an explanation about the warnings, given
   or not given, for such casts.

Changes since v1:
* also allow uintptr
* add an explanation of the logic, thanks to Linus.

Luc Van Oostenryck (2):
  also accept casts of AS pointers to uintptr_t
  man: explain role of uintptr_t & unsigned long in casts from AS
    pointers

 evaluate.c                |  2 +-
 sparse.1                  | 13 +++++++--
 validation/cast-from-as.c | 60 +++++++++++++++++++++++++++++++++++++++
 3 files changed, 71 insertions(+), 4 deletions(-)
 create mode 100644 validation/cast-from-as.c

-- 
2.21.0




[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