Thread (15 messages) 15 messages, 6 authors, 2024-07-25

Re: [PATCH] scripts: add macro_checker script to check unused parameters in macros

From: Andrew Morton <akpm@linux-foundation.org>
Date: 2024-07-23 22:09:32
Also in: linux-fsdevel, lkml

On Tue, 23 Jul 2024 05:11:54 -0400 Julian Sun [off-list ref] wrote:
Hi,

Recently, I saw a patch[1] on the ext4 mailing list regarding
the correction of a macro definition error. Jan mentioned
that "The bug in the macro is a really nasty trap...".
Because existing compilers are unable to detect
unused parameters in macro definitions. This inspired me
to write a script to check for unused parameters in
macro definitions and to run it.
Seems a useful contribution thanks.  And a nice changelog!
 scripts/macro_checker.py | 101 +++++++++++++++++++++++++++++++++++++++
Makes me wonder who will run this, and why.  Perhaps a few people will
run ls and wonder "hey, what's that".  But many people who might have
been interested in running this simply won't know about it.

"make help | grep check" shows we have a few ad-hoc integrations but I
wonder if we would benefit from a top-level `make static-checks'
target?
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help