Hello,

there is a small whitespace issue with -smpl_spacing when adding a function:

@@
@@
  typedef int *foo;
+ void *bar(int *baz)
+ {
+     return baz;
+ }

will generate with spatch -sp_file add_func.cocci -smpl_spacing add_func
--- add_func.c  2011-06-03 15:27:39.626536999 +0200
+++ /tmp/cocci-output-27108-3d0913-add_func.c   2011-06-03
15:32:32.730019210 +0200
@@ -1 +1,5 @@
 typedef int *foo;
+
+void *bar(int *baz){
+return baz;
+}

The issue is with "+void *bar(int *baz){" being merged in one line. The
body of the function is indented to match the surrounding code which
works in my case.

thanks
bye
        michael
_______________________________________________
Cocci mailing list
[email protected]
http://lists.diku.dk/mailman/listinfo/cocci
(Web access from inside DIKUs LAN only)

Reply via email to