be any more specific.
Anyways, is this a bug? Or was I doing something wrong in the first place?
Thanks and best regards,
--
Christoph Böhmwalder
LINBIT | Keeping the Digital World Running
DRBD HA — Disaster Recovery — Software defined Storage
___
Cocci ma
ble. If not, I guess we can
probably just live with the workaround.
julia
Thanks yet again for all your help.
--
Christoph Böhmwalder
LINBIT | Keeping the Digital World Running
DRBD HA — Disaster Recovery — Software defined Storage
___
Cocc
metavariable.
Right, I do want to exactly match NODE_END, so I removed the declaration;
still no match though. If it is detected as a known macro it should be able to
be substituted, right?
julia
Thanks,
--
Christoph Böhmwalder
LINBIT | Keeping the Digital World Running
DRBD HA — Disaster Recov
Am 27.03.20 um 17:15 schrieb Julia Lawall:
On Fri, 27 Mar 2020, Christoph Böhmwalder wrote:
Am 27.03.20 um 16:47 schrieb Julia Lawall:> Are you sure that the C code is
parsed successfully? I'm not at all sure
that static is allowed in an argument list. Types are allowed, bu static
is o
Am 27.03.20 um 16:47 schrieb Julia Lawall:> Are you sure that the C code
is parsed successfully? I'm not at all sure
that static is allowed in an argument list. Types are allowed, bu static
is only part of a type.
I'm pretty sure it is parsed successfully. At least spatch doesn't
complain
to solve this would be appreciated, thanks!
--
Christoph Böhmwalder
LINBIT | Keeping the Digital World Running
DRBD HA — Disaster Recovery — Software defined Storage
___
Cocci mailing list
Cocci@systeme.lip6.fr
https://systeme.lip6.fr/mailman/listinfo/cocci
to answer your question -- my priority here is to get the code
compiling; I don't actually care about any of the consts. Best case
scenario would be to have it remove whether or not the consts are there
and always add the new parameter with a const.
--
Christoph Böhmwalder
LINBIT | Keeping the Digita
;
+
Not exactly what I expected...
Thanks,
--
Christoph Böhmwalder
LINBIT | Keeping the Digital World Running
DRBD HA — Disaster Recovery — Software defined Storage
___
Cocci mailing list
Cocci@systeme.lip6.fr
https://systeme.lip6.fr/mailman/listinfo
I'm not sure if this is objectively the best solution, but it
seems
the most logical to me.
I'd be glad to hear any input you might have regarding this.
Again, thanks for all the help!
--
Christoph Böhmwalder
LINBIT | Keeping the Digital World Running
D
make the rule depend on the comment being there?
Thanks,
--
Christoph Böhmwalder
LINBIT | Keeping the Digital World Running
DRBD HA — Disaster Recovery — Software defined Storage
___
Cocci mailing list
Cocci@systeme.lip6.fr
https://systeme.lip6.fr/mailman/listinfo/cocci
he Ubuntu repos would be appropriate?
Thanks,
Christoph
--
Christoph Böhmwalder
LINBIT | Keeping the Digital World Running
DRBD HA — Disaster Recovery — Software defined Storage
___
Cocci mailing list
Cocci@systeme.lip6.fr
https://systeme.lip6.fr/mailman/listinfo/cocci
the __attribute__ in the first rule *and* the function
call as an argument in the second rule, if I remove either of those the patch
works as intended.
Regards,
Christoph
--
Christoph Böhmwalder
LINBIT | Keeping the Digital World Running
DRBD HA — Disaster Recovery — Software defined Storage
Hi,
Consider the following C code and cocci patch:
#include
int x;
int main(int argc, char **argv)
{
if (y)
do_something(x);
}
@@
identifier x;
@@
- do_something(x);
+ if (x)
+ do_one_thing();
+ else
+ do_another_thing();
For this input, spatch produces the
On 27.05.19 16:16, Markus Elfring wrote:
Am I missing something?
It depends on details.
Your initial transformation approach can be written also as follows.
@replacement@
identifier x;
@@
-int
+int*
x; >
In which scopes would you like to add the asterisk for the usage of a pointer
data
Hi,
I'm having trouble understanding coccinelles behaviour here. Consider
the following C code and cocci rules:
#include
int x;
int main(int argc, char **argv)
{
f(x);
}
@@
identifier x;
@@
- int x;
+ int *x;
@@
int *x;
@@
- f(x)
+ g(x)
Since I read on some slides[0] that "Later
Hi,
I'm trying to replace a function with a one-liner, where the one-liner
has a dependency on a header file that the function doesn't.
Now I want to include said header file iff it isn't already included
in the affected file.
In more concrete terms, this is my script:
@ find_linux_dcache_h @
On 22.05.19 13:55, Julia Lawall wrote:
On Wed, 22 May 2019, Christoph Böhmwalder wrote:
On 22.05.19 13:37, Julia Lawall wrote:
Is it always exactly this string that you want to add?
In my case, yes. I don't have any metavariable substitutions, etc; it's always
the same constant code
On 22.05.19 13:37, Julia Lawall wrote:
Is it always exactly this string that you want to add?
In my case, yes. I don't have any metavariable substitutions, etc; it's
always the same constant code.
--
Regards,
Christoph
___
Cocci mailing list
Hi,
Consider the following snippet of C:
#define f() ({ puts("hello"); 0; })
int main()
{
printf("%d\n", f());
}
It uses an expression statement in the definition of `f`, which is a gcc
extension.
Now let's try to write a semantic patch to generate something like this:
@@
@@
-
19 matches
Mail list logo