Skip to contentSkip to conversation

coccinelle: adjust the confidence of uninitialized_var.cocci

PATCH In review Qing Wang 2 participants 2 messages Dec 14, 2021 – Dec 26, 2021 Coccinelle/Semantic Patches (SmPL)

lore
Share & tools
lore

Qing Wang

author
#0 lore raw

PATCH 1/1 coccinelle: adjust the confidence of uninitialized_var.cocci

From: Wang Qing <[email protected]>

Since uninitialized_var() was removed, this cocci should reset its confidence to low.

---
 scripts/coccinelle/misc/uninitialized_var.cocci | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
scripts/coccinelle/misc/uninitialized_var.cocci +1 -1
index 69bbaae..79e02e3
@@ -18,7 +18,7 @@
 /// this kind were cleaned-up from the kernel. This cocci rule checks that
 /// the macro is not explicitly or implicitly reintroduced.
 ///
-// Confidence: High
+// Confidence: Low
 // Copyright: (C) 2020 Denis Efremov ISPRAS
 // Options: --no-includes --include-headers
 //
Signature · 1 line
2.7.4
maintainer
#1 lore raw
Quoted 4 lines · Qing Wang

From: Wang Qing <[email protected]>

Since uninitialized_var() was removed, this cocci should reset its confidence to low.

I'm not sure to understand the argument for this one. The semantic patch in its current state is looking for declarations that hide an uninitialized variable. The part about the uninitialized_var macro is not there any more. The problem that is searched for seems reasonable to address.

julia

Quoted 23 lines
---
 scripts/coccinelle/misc/uninitialized_var.cocci | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
scripts/coccinelle/misc/uninitialized_var.cocci +1 -2
index 69bbaae..79e02e3
@@ -18,7 +18,7 @@
 /// this kind were cleaned-up from the kernel. This cocci rule checks that
 /// the macro is not explicitly or implicitly reintroduced.
 ///
-// Confidence: High
+// Confidence: Low
 // Copyright: (C) 2020 Denis Efremov ISPRAS
 // Options: --no-includes --include-headers
 //
--

2.7.4