gcc-plugins: structleak: remove unneeded variable 'ret'

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>
Signed-off-by: Kees Cook <keescook@chromium.org>
Link: https://lore.kernel.org/r/20200418070505.10715-1-yanaijie@huawei.com
This commit is contained in:
Jason Yan 2020-04-18 15:05:05 +08:00 committed by Kees Cook
parent fe07bfda2f
commit b924a8197a

View File

@ -170,7 +170,6 @@ static void initialize(tree var)
static unsigned int structleak_execute(void)
{
basic_block bb;
unsigned int ret = 0;
tree var;
unsigned int i;
@ -200,7 +199,7 @@ static unsigned int structleak_execute(void)
initialize(var);
}
return ret;
return 0;
}
#define PASS_NAME structleak