Coccinelle is confuse by extern __printf macro (ie attribute)
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.
Cheers,
Jérôme
_______________________________________________
Cocci mailing list
[email protected]
https://systeme.lip6.fr/mailman/listinfo/cocci
Quoted 14 lines · Jerome Glisse
Coccinelle get confuse with kernel extern
__printfmacro for instance:
test.c:
extern__printf(3, 4)
intfoo(int, int, char *, ...);
voidtoto(int, long);test.sp:
@@
@@
void toto(int,
+void *,
long);
Quoted 3 lines
The semantic patch will not work. But if extern is remove or if
__printfmacro is remove then it works. Also having extern and__printfon different line make it works.
Maybe adding
#define __printf(a,b)
to standard.h will help?
julia
Quoted 8 lines
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
Quoted 22 lines · Julia Lawall
Quoted 14 lines · Jerome Glisse
Coccinelle get confuse with kernel extern
__printfmacro for instance:
test.c:
extern__printf(3, 4)
intfoo(int, int, char *, ...);
voidtoto(int, long);test.sp:
@@
@@
void toto(int,
+void *,
long);Quoted 3 lines
The semantic patch will not work. But if extern is remove or if
__printfmacro is remove then it works. Also having extern and__printfon different line make it works.
Quoted 6 lines
Maybe adding
#define
__printf(a,b)to
standard.hwill help?
Sorry to get back so late, yes adding #define __printf(a,b) to standard.h solve the issue. Thank you for the pointer.
Cheers,
Jérôme
_______________________________________________
Cocci mailing list
[email protected]
https://systeme.lip6.fr/mailman/listinfo/cocci