Bug#618555: spatch: exception Failure("More that one variable in decl. Have to split to transform.")
Package: coccinelle
Version: 0.2.4.deb-3
Hi,
Given the uninitialized.cocci and fast-import.c as below[1], we
find:
$ spatch -sp_file uninitialized.cocci fast-import.c
init_defs_builtins: /usr/share/coccinelle/standard.h
HANDLING: fast-import.c
Fatal error: exception Failure("More that one variable in decl. Have to split to transform.")
I see two problems:
1. The message is unclear. I suppose the intent is something like
fatal: cannot transform a line with multiple declarations in it
2. The limitation is unfortunate.
Known problem? Do I understand correctly?
Thanks for spatch. :) It's a great tool.
Jonathan
[1]
-- 8< -- uninitialized.cocci -- 8< --
@@
identifier x;
type T;
@@
- T x = x;
+ T x;
-- >8 -- snipsnip -- >8 --
-- 8< -- fast-import.c -- 8< --
static void parse_merge(void)
{
int *list = NULL, *n, *e = e;
}
-- >8 -- snipsnip -- >8 --
Reply to: