On Mon, Dec 05, 2022 at 10:01:11PM +0100, René Scharfe wrote: > This rule would turn this code: > > struct foo *bar = xcalloc(1, sizeof(*bar)); > int i; > > ... into: > > struct foo *bar; > CALLOC(bar); > int i; > > ... which violates the coding guideline to not mix declarations and > statements (-Wdeclaration-after-statement). Yeah, I was wondering about this myself when I wrote this part of the Coccinelle patch. Is there an intelligent way to tell it to put the first statement after all declarations? I couldn't find anything after a quick scan of the documentation nor our own patches. Thanks, Taylor