All of lore.kernel.org
 help / color / mirror / Atom feed
* [RFC] Detecting unchecked return values (with SmPL)?
@ 2026-11-30 13:00 ` Markus Elfring
  0 siblings, 0 replies; 15+ messages in thread
From: Markus Elfring @ 2026-11-30 13:00 UTC (permalink / raw)
  To: cocci, tools, kernel-janitors; +Cc: LKML

Hello,

Macro and function calls for which a return value is not assigned to a variable
can be found also by a script (like the following) for the semantic patch language.

@display@
identifier i;
statement s;
@@
(
*i(...);
&s
)


Some developers and software reviewers care for a corresponding topic.

CWE-252: Unchecked Return Value
https://cwe.mitre.org/data/definitions/252.html


Thus I suggest to refine case distinctions accordingly.

1. Identifiers can eventually be excluded if they would denote items
   with the return type “void”.

2. Identifiers can eventually be restricted to names that would denote items
   according to non-void return types.


Which structures would you choose for such data processing purposes?

Regards,
Markus

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

end of thread, other threads:[~2026-12-01 18:00 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-11-30 13:00 [RFC] Detecting unchecked return values (with SmPL)? Markus Elfring
2026-11-30 13:00 ` [cocci] " Markus Elfring
2026-11-30 13:05 ` Julia Lawall
2026-11-30 13:05   ` [cocci] " Julia Lawall
2026-11-30 13:25   ` Markus Elfring
2026-11-30 13:52     ` Julia Lawall
2026-11-30 14:00   ` Markus Elfring
2026-11-30 15:49     ` Julia Lawall
2026-11-30 15:58       ` Markus Elfring
2026-11-30 16:01         ` Julia Lawall
2026-11-30 16:44 ` Markus Elfring
2026-12-01  8:46 ` Markus Elfring
2026-12-01  8:46   ` [cocci] " Markus Elfring
2026-12-01 12:00 ` Markus Elfring
2026-12-01 18:00 ` Markus Elfring

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.