Skip to contentSkip to conversation

coccinelle: misc: add uninitialized_var.cocci script

RFC PATCH Julia Lawall 1 participant 1 message Aug 12, 2020 1 message not in the archive Kernel janitors

lore
Share & tools
lore

A message that is not in the archive (sent off-list or not yet received): [email protected]

#1 lore raw
Quoted 14 lines · Markus Elfring

Review

Quoted 10 lines

+@r@

(quoted diff) +9 -0
+identifier var;
+type T;
+position p;
+@@
+
+(
+* T var@p = var;
+|
+* T var@p = *(&(var));

I suggest to simplify such code for the semantic patch language a bit. Can an other variant be more succinct for the application of a SmPL disjunction?

Quoted 1 line

+*T var@p = \( var \| *(&(var)) \);

It's fine as is.

julia