* [PATCH] gcc-plugins: structleak: remove unneeded variable 'ret'
@ 2020-04-18 7:05 Jason Yan
2021-03-02 22:54 ` Kees Cook
0 siblings, 1 reply; 2+ messages in thread
From: Jason Yan @ 2020-04-18 7:05 UTC (permalink / raw)
To: keescook, re.emese, kernel-hardening, linux-kernel; +Cc: Jason Yan, Hulk Robot
Fix the following coccicheck warning:
scripts/gcc-plugins/structleak_plugin.c:177:14-17: Unneeded variable:
"ret". Return "0" on line 207
Reported-by: Hulk Robot <hulkci@huawei.com>
Signed-off-by: Jason Yan <yanaijie@huawei.com>
---
scripts/gcc-plugins/structleak_plugin.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/scripts/gcc-plugins/structleak_plugin.c b/scripts/gcc-plugins/structleak_plugin.c
index e89be8f5c859..fdff6278eda0 100644
--- a/scripts/gcc-plugins/structleak_plugin.c
+++ b/scripts/gcc-plugins/structleak_plugin.c
@@ -174,7 +174,6 @@ static void initialize(tree var)
static unsigned int structleak_execute(void)
{
basic_block bb;
- unsigned int ret = 0;
tree var;
unsigned int i;
@@ -204,7 +203,7 @@ static unsigned int structleak_execute(void)
initialize(var);
}
- return ret;
+ return 0;
}
#define PASS_NAME structleak
--
2.21.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] gcc-plugins: structleak: remove unneeded variable 'ret'
2020-04-18 7:05 [PATCH] gcc-plugins: structleak: remove unneeded variable 'ret' Jason Yan
@ 2021-03-02 22:54 ` Kees Cook
0 siblings, 0 replies; 2+ messages in thread
From: Kees Cook @ 2021-03-02 22:54 UTC (permalink / raw)
To: Jason Yan, linux-hardening, linux-kernel; +Cc: Kees Cook, Hulk Robot
On Sat, 18 Apr 2020 15:05:05 +0800, Jason Yan wrote:
> Fix the following coccicheck warning:
>
> scripts/gcc-plugins/structleak_plugin.c:177:14-17: Unneeded variable:
> "ret". Return "0" on line 207
Applied to for-next/gcc-plugins, thanks!
[1/1] gcc-plugins: structleak: remove unneeded variable 'ret'
https://git.kernel.org/kees/c/b924a8197ac7
--
Kees Cook
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2021-03-03 10:40 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-04-18 7:05 [PATCH] gcc-plugins: structleak: remove unneeded variable 'ret' Jason Yan
2021-03-02 22:54 ` Kees Cook
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).