>>> The cast is useful when it is to a non-pointer type. >> >> Will it be needed then to use an other metavariable for the assignment >> target? >> >> How much would you like to distinguish if an item should handle a pointer >> (or not)? > > The compiler will complain about an assignment between an integer and a > pointer,
This tool distinguishes data types better. > so one can assume that if the code is > > x = (T *)kmalloc(); > > then x has pointer type. We “hope” so. How do you think about restrict the type for an acceptable target expression? > If it doesn't have type T *, it doesn't matter. I have got an other opinion for the corresponding specification in SmPL scripts. I would prefer to avoid another bit of logical confusion. Regards, Markus _______________________________________________ Cocci mailing list Cocci@systeme.lip6.fr https://systeme.lip6.fr/mailman/listinfo/cocci