From mboxrd@z Thu Jan 1 00:00:00 1970 From: SF Markus Elfring Date: Wed, 23 Sep 2015 15:17:35 +0000 Subject: Re: [PATCH v3] coccinelle: tests: unsigned value cannot be lesser than zero Message-Id: <5602C28F.9010302@users.sourceforge.net> List-Id: References: <1442831864-25759-1-git-send-email-a.hajda@samsung.com> <55FFFFF4.4000007@users.sourceforge.net> <56000777.6060208@samsung.com> <56017374.3080402@users.sourceforge.net> <5602560B.2000601@samsung.com> In-Reply-To: <5602560B.2000601@samsung.com> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: cocci@systeme.lip6.fr > In the example above spatch finds ull, ulli, but not ul and uli. > If you add int to unsigned long long, it won't find anything. I suggest to take another look at the use of type modifiers in the semantic patch language. It seems that it matters occasionally to specify them explicitly. How do you think about to reuse a SmPL script like the following? @find_unsigned@ typedef _Bool, bool, u8, u16, u32, u64; { unsigned, unsigned char, unsigned int, unsigned short, unsigned short int, unsigned long, unsigned long int, unsigned long long, unsigned long long int, size_t, _Bool, bool, u8, u16, u32, u64 } var; @@ *var Regards, Markus