Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1231197
| From | Andrzej Hajda <a.hajda@samsung.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH v3] coccinelle: tests: unsigned value cannot be lesser than zero |
| Date | 2015-09-23 09:40 +0200 |
| Message-ID | <qbMOK-5WP-13@gated-at.bofh.it> (permalink) |
| References | <q9WyR-1KZ-7@gated-at.bofh.it> <qb6FQ-42w-9@gated-at.bofh.it> <qb912-7vU-33@gated-at.bofh.it> <qb9u2-83M-15@gated-at.bofh.it> <qbxG3-P2-47@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
On 09/22/2015 05:27 PM, SF Markus Elfring wrote:
>> If you mean adding int to 'unsigned long [long]' types, it does not work.
>> For some reason it works only without adding int after long.
> Do you get any error message for this SmPL approach?
> With which source files do you try the extended SmPL script out?
>
> Regards,
> Markus
>
No, spatch just does not find everything it should. Sample below:
--- test.cocci
virtual context
@r depends on context@
{unsigned char, unsigned short int, unsigned int, unsigned long int, unsigned
long long, size_t} v;
@@
*v
--- test.c
void f()
{
unsigned long ul;
unsigned long int uli;
unsigned long long ull;
unsigned long long int ulli;
ul;
uli;
ull;
ulli;
}
---
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.
Regards
Andrzej
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
Re: [PATCH v3] coccinelle: tests: unsigned value cannot be lesser than zero SF Markus Elfring <elfring@users.sourceforge.net> - 2015-09-22 17:30 +0200
Re: [PATCH v3] coccinelle: tests: unsigned value cannot be lesser than zero Andrzej Hajda <a.hajda@samsung.com> - 2015-09-23 09:40 +0200
Re: [PATCH v3] coccinelle: tests: unsigned value cannot be lesser than zero SF Markus Elfring <elfring@users.sourceforge.net> - 2015-09-23 17:20 +0200
csiph-web