On Wed, 27 Feb 2019, Jerome Glisse wrote:

> Coccinelle get confuse with kernel extern __printf macro for instance:
>
> test.c:
> extern __printf(3, 4)
> int foo(int, int, char *, ...);
> void toto(int, long);
>
> test.sp:
> @@
> @@
> void toto(int,
> +void *,
> long);
>
> The semantic patch will not work. But if extern is remove or if __printf
> macro is remove then it works. Also having extern and __printf on different
> line make it works.

Maybe adding

#define __printf(a,b)

to standard.h will help?

julia

>
> Cheers,
> Jérôme
> _______________________________________________
> Cocci mailing list
> [email protected]
> https://systeme.lip6.fr/mailman/listinfo/cocci
>
_______________________________________________
Cocci mailing list
[email protected]
https://systeme.lip6.fr/mailman/listinfo/cocci

Reply via email to