Hi Julia,
thanks for the quick response.
> On 1 Nov 2019, at 14:09, Julia Lawall wrote:
>
> This is not possible. ... describes control-flow paths. Nothing happens
> after a return. Your attempt above would match functions where all
> control-flow paths end with return (ISC_R_SUCCESS);,
On Fri, 1 Nov 2019, Ondřej Surý wrote:
> Hi,
>
> we changed our allocator (wrapper) function to assert() instead of returning
> ISC_R_MEMORY.
>
> As you can imagine there’s a lot of checks down the road that needs to be
> cleaned up,
> so I am looking for a way to detect function that only
Hi,
we changed our allocator (wrapper) function to assert() instead of returning
ISC_R_MEMORY.
As you can imagine there’s a lot of checks down the road that needs to be
cleaned up,
so I am looking for a way to detect function that only does:
isc_result_t
foo(…) {
…
return (ISC_R_SUCCESS);
}
> I guess that another small test approach will trigger further development
> considerations.
@replacement@
@@
if (...)
-{
+info:
+puts("surprise");
-}
…
elfring@Sonne:~/Projekte/Coccinelle/Probe> spatch
empty_compound_statement_for_if1.c
replace_empty_compound_statement_for_if5.cocci
…
@@
> How would you like to improve the pretty-printing for the Coccinelle software?
I guess that another small test approach will trigger further development
considerations.
@replacement@
@@
if (...)
-{
-}
+info:
+puts("surprise");
elfring@Sonne:~/Projekte/Coccinelle/Probe> spatch
> How would you like to improve the pretty-printing for the Coccinelle software?
I can reproduce this glitch by the combination of test files like the following,
can't you?
@adjustment@
expression result;
@@
if (...)
-{
-result = -ENODEV;
goto
- out_kfree_ioc
+ e_nodev
;
-}
static
> And the unwanted space characters are where?
At the end of the shown three lines.
Would you like to try the following commands out on the updated source file?
* git diff --check …
drivers/scsi/megaraid/megaraid_sas_base.c:8275: trailing whitespace.
…
* scripts/checkpatch.pl --types
On Fri, 1 Nov 2019, Markus Elfring wrote:
> > The following SmPL script variant can generate an usable test result.
>
> Yesterday I noticed during the preparation of a corresponding commit
> that unwanted space characters were added at three places in the generated
> patch.
>
>
> The following SmPL script variant can generate an usable test result.
Yesterday I noticed during the preparation of a corresponding commit
that unwanted space characters were added at three places in the generated
patch.
elfring@Sonne:~/Projekte/Linux/next-patched> spatch --in-place
> * Defalut value
* Default value
> * Directory selection
> * Single file selection
>
> Would it be better?
Partly, yes.
Regards,
Markus
___
Cocci mailing list
Cocci@systeme.lip6.fr
https://systeme.lip6.fr/mailman/listinfo/cocci
10 matches
Mail list logo