All of lore.kernel.org
 help / color / mirror / Atom feed
* [Cocci] Change function invocations argument
@ 2014-12-20 20:21 Eliseo Martínez
  2014-12-20 20:32 ` Julia Lawall
  0 siblings, 1 reply; 22+ messages in thread
From: Eliseo Martínez @ 2014-12-20 20:21 UTC (permalink / raw)
  To: cocci

Hi, 

For a given function, I want to change all invocations in this way:
Turn the second argument of the form ?(long_u)(expression)? into ?(uintmax_t)expression?.
I?ve done a patch for that but is failing with a not very much informative message error.
Here is it:

```
eliseo at ubuntu:~/projects/os/neovim/neovim$ cat sample.cocci 
@@ expression e1, e2, e3; @@

  put_bytes(
    e1,
-   (long_u)(e2),
+   (uintmax_t)e2,
    e3)

eliseo at ubuntu:~/projects/os/neovim/neovim$ spatch --parse-cocci sample.cocci 
init_defs_builtins: /usr/share/coccinelle/standard.h
84 86
Fatal error: exception Failure("plus: parse error: 
 = File "sample.cocci", line 6, column 15,  charpos = 84
    around = 'e2', whole content = +   (uintmax_t)e2,
?)
```

What I?m doing wrong here??
Thanks.

^ permalink raw reply	[flat|nested] 22+ messages in thread

end of thread, other threads:[~2014-12-22 13:33 UTC | newest]

Thread overview: 22+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-12-20 20:21 [Cocci] Change function invocations argument Eliseo Martínez
2014-12-20 20:32 ` Julia Lawall
2014-12-20 20:45   ` Eliseo Martínez
2014-12-20 20:51     ` Julia Lawall
2014-12-21 10:43       ` Eliseo Martínez
2014-12-21 10:57         ` Julia Lawall
2014-12-21 11:14           ` Eliseo Martínez
2014-12-21 11:16             ` Julia Lawall
2014-12-21 11:19               ` Eliseo Martínez
2014-12-21 11:20                 ` Julia Lawall
2014-12-21 11:55             ` SF Markus Elfring
2014-12-21 12:04               ` Julia Lawall
2014-12-21 12:24                 ` Eliseo Martínez
2014-12-21 12:49                   ` SF Markus Elfring
2014-12-21 12:50                     ` Eliseo Martínez
2014-12-21 12:55                       ` SF Markus Elfring
2014-12-21 13:12                         ` Eliseo Martínez
2014-12-21 13:44                           ` [Cocci] Source code clean-up for parentheses? SF Markus Elfring
2014-12-21 13:48                             ` SF Markus Elfring
2014-12-21 14:13                           ` [Cocci] Change function invocations argument Julia Lawall
2014-12-21 14:01                   ` Julia Lawall
2014-12-22 13:33                     ` Michael Stefaniuc

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.