Skip to content

Commit

Permalink
gcc-plugins: structleak: remove unneeded variable 'ret'
Browse files Browse the repository at this point in the history
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
  • Loading branch information
Jason Yan authored and Kees Cook committed Mar 2, 2021
1 parent fe07bfd commit b924a81
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions scripts/gcc-plugins/structleak_plugin.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down Expand Up @@ -200,7 +199,7 @@ static unsigned int structleak_execute(void)
initialize(var);
}

return ret;
return 0;
}

#define PASS_NAME structleak
Expand Down

0 comments on commit b924a81

Please sign in to comment.