On 2/7/2020 2:48 PM, Julia Lawall wrote:
> 
> 
> On Fri, 7 Feb 2020, Pan Nengyuan wrote:
> 
>> Hello,
>>
>> I have an example:
>>
>>     @@ expression d,p; @@
>>
>>     - g_autoptr(d) p;
>>     + g_autoptr(d) p = NULL;
>>
>> C source code:
>>
>>     void f(void)
>>     {
>>         g_autoptr(Test) *p1;
>>     }
>>
>> Then I got this error:
>> minus: parse error:
>>   File "test.cocci", line 3, column 15, charpos = 38
>>   around = 'p',
>>   whole content = - g_autoptr(d) p;
>>
>>
>> is it correct?
> 
> No, Coccinelle knows nothing about these things.  If you don't care about
> the types of these variables, you can extend standard.h to say
> 
> #define g_autoptr(x) int

OK, thanks. I will try it.

> 
> julia
> .
> 
_______________________________________________
Cocci mailing list
[email protected]
https://systeme.lip6.fr/mailman/listinfo/cocci

Reply via email to