[Cocci] What is the spatch file for this change and the corresponding spatch command line invocation

Luis R. Rodriguez mcgrof at suse.com
Wed Dec 3 18:34:49 CET 2014


On Wed, Dec 03, 2014 at 06:29:54PM +0100, Francois Berenger wrote:
> Hello,
>
> I give up trying to write the spatch myself:
>
> Before file:
> ---
> int i;
>
> for ( ; ; ++i ) {
>   if (1) {
>     continue;
>   }
> }
> ---
>
> After file:
> ---
> int i;
>
> for ( ; ; ) {
>   if (1) {
>     ++i;
>     continue;
>   }
>   ++i;
> }
> ---
>
> All my trials don't work, not any change in the file appears
> if I try --in-place and -o fails because
> "-o can not be applied because there are no modified files"

Can you take the hands on tutorial before expecting folks to
write rules for you?

https://www.youtube.com/watch?v=buZrNd6XkEw

  Luis


More information about the Cocci mailing list