mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-02 23:33:54 -06:00
coccinelle: add a script to remove useless casts
Script from LKML. Signed-off-by: Laurent Vivier <lvivier@redhat.com> Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
This commit is contained in:
parent
a41c457881
commit
ac4e29f100
1 changed files with 7 additions and 0 deletions
7
scripts/coccinelle/typecast.cocci
Normal file
7
scripts/coccinelle/typecast.cocci
Normal file
|
@ -0,0 +1,7 @@
|
|||
// Remove useless casts
|
||||
@@
|
||||
type T;
|
||||
T v;
|
||||
@@
|
||||
- (T *)&v
|
||||
+ &v
|
Loading…
Add table
Add a link
Reference in a new issue