[PATCH v3 4/4] cocci: prevent extern function declarations

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Since function declarations already implicitly imply extern, create a
Coccinelle rule which removes the redundant extern.

Signed-off-by: Denton Liu <liu.denton@xxxxxxxxx>
---
 contrib/coccinelle/noextern.cocci | 6 ++++++
 1 file changed, 6 insertions(+)
 create mode 100644 contrib/coccinelle/noextern.cocci

diff --git a/contrib/coccinelle/noextern.cocci b/contrib/coccinelle/noextern.cocci
new file mode 100644
index 0000000000..8cb39ac947
--- /dev/null
+++ b/contrib/coccinelle/noextern.cocci
@@ -0,0 +1,6 @@
+@@
+type T;
+identifier f;
+@@
+- extern
+  T f(...);
-- 
2.21.0.832.gd5ec0d3bee





[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux