Skip to content

Commit b924a81

Browse files
JasonYanHwkees
authored andcommitted
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 <[email protected]> Signed-off-by: Jason Yan <[email protected]> Signed-off-by: Kees Cook <[email protected]> Link: https://lore.kernel.org/r/[email protected]
1 parent fe07bfd commit b924a81

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

scripts/gcc-plugins/structleak_plugin.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -170,7 +170,6 @@ static void initialize(tree var)
170170
static unsigned int structleak_execute(void)
171171
{
172172
basic_block bb;
173-
unsigned int ret = 0;
174173
tree var;
175174
unsigned int i;
176175

@@ -200,7 +199,7 @@ static unsigned int structleak_execute(void)
200199
initialize(var);
201200
}
202201

203-
return ret;
202+
return 0;
204203
}
205204

206205
#define PASS_NAME structleak

0 commit comments

Comments
 (0)