Coccinelle archive on lore.kernel.org
 help / 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	[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, back to index

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

Coccinelle archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/cocci/0 cocci/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 cocci cocci/ https://lore.kernel.org/cocci \
		cocci@systeme.lip6.fr cocci@archiver.kernel.org
	public-inbox-index cocci


Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/fr.lip6.systeme.cocci


AGPL code for this site: git clone https://public-inbox.org/ public-inbox