cocci.inria.fr archive mirror
 help / color / mirror / Atom feed
* [Cocci] [PATCH] add __printf and __must_hold macro
@ 2019-04-08 16:35 jglisse
  2019-04-08 19:57 ` Julia Lawall
  0 siblings, 1 reply; 2+ messages in thread
From: jglisse @ 2019-04-08 16:35 UTC (permalink / raw)
  To: Julia Lawall; +Cc: cocci

From: Jérôme Glisse <jglisse@redhat.com>

Signed-off-by: Jérôme Glisse <jglisse@redhat.com>
---
 standard.h | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/standard.h b/standard.h
index d9200643..7ce601be 100644
--- a/standard.h
+++ b/standard.h
@@ -368,6 +368,9 @@
 #define __releases(x)
 #define __acquires(x)
 
+#define __must_hold(x)
+#define __printf(a,b)
+
 //now in lexer
 //#define __declspec(x)
 
-- 
2.20.1

_______________________________________________
Cocci mailing list
Cocci@systeme.lip6.fr
https://systeme.lip6.fr/mailman/listinfo/cocci

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

* Re: [Cocci] [PATCH] add __printf and __must_hold macro
  2019-04-08 16:35 [Cocci] [PATCH] add __printf and __must_hold macro jglisse
@ 2019-04-08 19:57 ` Julia Lawall
  0 siblings, 0 replies; 2+ messages in thread
From: Julia Lawall @ 2019-04-08 19:57 UTC (permalink / raw)
  To: Jérôme Glisse; +Cc: cocci

[-- Attachment #1: Type: text/plain, Size: 820 bytes --]



On Mon, 8 Apr 2019, jglisse@redhat.com wrote:

> From: Jérôme Glisse <jglisse@redhat.com>
>
> Signed-off-by: Jérôme Glisse <jglisse@redhat.com>

Thanks for the contribution.  It's now available on github.

For macros, it would be helpful to do the following:

spatch --parse-c linuxkernel

apply patch

spatch --parse-c linuxkernel

Observe an improvement in the numbers that are printed out at the end.

These look safe enough, though.

julia

> ---
>  standard.h | 3 +++
>  1 file changed, 3 insertions(+)
>
> diff --git a/standard.h b/standard.h
> index d9200643..7ce601be 100644
> --- a/standard.h
> +++ b/standard.h
> @@ -368,6 +368,9 @@
>  #define __releases(x)
>  #define __acquires(x)
>
> +#define __must_hold(x)
> +#define __printf(a,b)
> +
>  //now in lexer
>  //#define __declspec(x)
>
> --
> 2.20.1
>
>

[-- Attachment #2: Type: text/plain, Size: 136 bytes --]

_______________________________________________
Cocci mailing list
Cocci@systeme.lip6.fr
https://systeme.lip6.fr/mailman/listinfo/cocci

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

end of thread, other threads:[~2019-04-08 19:57 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-04-08 16:35 [Cocci] [PATCH] add __printf and __must_hold macro jglisse
2019-04-08 19:57 ` Julia Lawall

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).