Hi Andriy,

On Fri, Nov 12, 2010 at 2:26 PM, Andriy Gapon <[email protected]> wrote:
>
> I wonder if coccinelle can help me with the following issue.
> There is a type, let's call it sometype_t, that is typedef-ed to int.
> There is an API which uses that type consistently to provide for possible 
> future
> extensions.  But that there are many lax users of that API which frequently 
> use
> int instead of sometype_t.
> For example, sometimes a sometype_t variable is assigned with int value, or
> conversely a sometype_t value is assigned to int variable, or int value is 
> passed
> in a function parameter where sometype_t is expected.
>
> I wonder if I could use the power of coccinelle to easily find and perhaps 
> even
> fix such lax type handling.

Coccinelle should be useful for that purpose, i.e. finding and fixing.

What kind of sometype_t values do you have ?
Is it some #define constant ?
Do you already have the set of fonctions that take a sometype_t parameter
or should you first find them ?

>
> Thanks!
> --
> Andriy Gapon
> _______________________________________________
> Cocci mailing list
> [email protected]
> http://lists.diku.dk/mailman/listinfo/cocci
> (Web access from inside DIKUs LAN only)
>



-- 
Nicolas Palix
Tel: +33 6 81 07 91 72
_______________________________________________
Cocci mailing list
[email protected]
http://lists.diku.dk/mailman/listinfo/cocci
(Web access from inside DIKUs LAN only)

Reply via email to