[Cocci] const int types
Vasiliy Kulikov
segooon at gmail.com
Tue Nov 16 20:12:35 CET 2010
On Tue, Nov 16, 2010 at 09:22 +0100, Julia Lawall wrote:
> > I thought that
> > (s)size_t may be equal to int, long or long long depending on current
> > arch and command line arguments.
>
> Sorry, but I'm still not sure what Coccinelle is supposed to do with the
> information about the size of size_t.
E.g. this one:
@@
ssize_t x;
expression e;
@@
(
x
|
*e
)
= read(...)
Result of read(2) must be stores in ssize_t. If int is the same as
ssize_t then it's OK, otherwise it is a bug.
Thanks,
--
Vasiliy
More information about the Cocci
mailing list