lib: Dhrystone: initialize ret value
PATCH 1/1 lib: Dhrystone: initialize ret value
Initialize ret value whenever 'if' condition is false in dhry_run_set.
---
Dear Developers:
When I invoke make bzImage LLVM=1, clang complains followings:lib/dhry_run.c:61:6: error: variable 'ret' is used uninitialized whenever 'if' condition is false
Fix above complain by initialize the ret value.
Thanks
Zhouyi
--
lib/dhry_run.c | 1 + 1 file changed, 1 insertion(+)
lib/dhry_run.c +1 -0
@@ -64,6 +64,7 @@ static int dhry_run_set(const char *val, const struct kernel_param *kp)return ret; }else { dhry_run = true; + ret =0 ; }if (dhry_run && system_state ==SYSTEM_RUNNING )
Signature · 1 line
2.34.1
Quoted 8 lines · Zhouyi Zhou
Initialize ret value whenever 'if' condition is false in
dhry_run_set.Signed-off-by Zhouyi Zhou <[email protected]>---
Dear Developers:
When I invoke make bzImage LLVM=1, clang complains followings:lib/dhry_run.c:61:6: error: variable 'ret' is used uninitialized whenever 'if' condition is false
Quoted 4 lines
Fix above complain by initialize the ret value.
Thanks
Zhouyi
Thank you for the patch! I think this has already been fixed:
https://lore.kernel.org/[email protected]/
-next is on a break so it won't be there for a bit:
https://lore.kernel.org/[email protected]/
Cheers,
Nathan
Quoted 19 lines
--
lib/dhry_run.c | 1 + 1 file changed, 1 insertion(+)lib/dhry_run.c +1
-0@@ -64,6 +64,7 @@ static int dhry_run_set(const char *val, const struct kernel_param *kp)return ret; }else { dhry_run = true; + ret =0 ; }if (dhry_run && system_state ==SYSTEM_RUNNING )Signature · 1 line
2.34.1
Quoted 10 lines · Nathan Chancellor
Quoted 8 lines · Zhouyi Zhou
Initialize ret value whenever 'if' condition is false in
dhry_run_set.Signed-off-by Zhouyi Zhou <[email protected]>---
Dear Developers:
When I invoke make bzImage LLVM=1, clang complains followings:lib/dhry_run.c:61:6: error: variable 'ret' is used uninitialized whenever 'if' condition is false
Quoted 8 lines
Quoted 4 lines
Fix above complain by initialize the ret value.
Thanks
ZhouyiThank you for the patch! I think this has already been fixed:
Thank you for reviewing my patch ;-), I see
Quoted 4 lines
-next is on a break so it won't be there for a bit:
Thank you for your guidance, I think I should stop working on -next for awhile ;-)
Quoted 3 lines
Cheers,
Nathan
Cheers
Zhouyi
Quoted 20 lines
Quoted 20 lines
--
lib/dhry_run.c | 1 + 1 file changed, 1 insertion(+)lib/dhry_run.c +1
-1@@ -64,6 +64,7 @@ static int dhry_run_set(const char *val, const struct kernel_param *kp)return ret; }else { dhry_run = true; + ret =0 ; }if (dhry_run && system_state ==SYSTEM_RUNNING ) --2.34.1