cocci: add test to check for uint use

uint is non-standard and not supported by MinGW. So ban it's use.

spatch file by Eric Leblond.
pull/2850/head
Victor Julien 8 years ago
parent afed6fe4a2
commit 5ea58fe3c4

@ -7,6 +7,7 @@ EXTRA_DIST= access-pkt-packet.cocci \
size_t.cocci \
struct-flags.cocci \
sz3.cocci \
uint.cocci \
run_check.sh struct-flags.py
if HAVE_COCCINELLE

@ -0,0 +1,13 @@
@uint@
uint i;
position p1;
@@
i@p1
@script:python@
p1 << uint.p1;
@@
print "banned type uint used at at %s:%s, please use a explicit length." % (p1[0].file, p1[0].line)
import sys
sys.exit(1)
Loading…
Cancel
Save