On Wed, Oct 23, 2019 at 10:18:58AM +0200, Michal Privoznik wrote:
[...]
Thanks for the explanation. In case you didn't discover it, cocci has
a very responsive upstream mailing list:
https://systeme.lip6.fr/mailman/listinfo/cocci
1: Thing is, while coccinelle understands C very well, it doesn't
quite
understand all those __attribute__ and other extensions. Therefore,
some macros
made it impossible for coccinelle to parse some functions (e.g. g_autofree,
g_autoptr and similar) and it did not perform requested change there then.
They might be interested in if there's anything that can be done about
this. In libguestfs, nbdkit etc we are extensively using the cleanup
attribute, and so is systemd. I've even seen [somewhere, can't find
it at the moment] a proposal to add the equivalent feature to the next
C standard.
Rich.
--
Richard Jones, Virtualization Group, Red Hat
http://people.redhat.com/~rjones
Read my programming and virtualization blog:
http://rwmj.wordpress.com
libguestfs lets you edit virtual machines. Supports shell scripting,
bindings from many languages.
http://libguestfs.org