On Sun, 22 May 2011, Francis Galiegue wrote:
> ... Where the new type is a typedef of the old one. This is in a single file.
>
> I have:
>
> typedef struct mystruct_s {
> ...
> } mystruct_t;
>
> and a LOT of functions are defined as:
>
> sometype somefunc(..., struct mystruct_s *x, ...)
>
> Unfortunately, I don't know how to do it... The file is parsed
> successfully in its entirety (-parse_c), and I have tried this
> semantic patch, which does not work:
>
> ----
> @@
> type t;
You don't need this.
> identifier fn;
> identifier var;
> @@
>
> t
Or this. Function return types and other modifiers are marched
implicitly.
> fn(...,
> - struct conf_var_s
Are you missing a * here?
julia
> + conf_var_t
> var,
> ...
> ) { ... }
> ----
>
> What is the solution to this?
>
> --
> Francis Galiegue, [email protected]
> "It seems obvious [...] that at least some 'business intelligence'
> tools invest so much intelligence on the business side that they have
> nothing left for generating SQL queries" (Stéphane Faroult, in "The
> Art of SQL", ISBN 0-596-00894-5)
> _______________________________________________
> Cocci mailing list
> [email protected]
> http://lists.diku.dk/mailman/listinfo/cocci
> (Web access from inside DIKUs LAN only)
> _______________________________________________
Cocci mailing list
[email protected]
http://lists.diku.dk/mailman/listinfo/cocci
(Web access from inside DIKUs LAN only)