Commit e34bace
committed
nvme: initialize get-feature command result value as zero
This is to resolve the build error below.
../nvme.c:4851:9: error: ‘result’ may be used uninitialized [-Werror=maybe-uninitialized]
4851 | nvme_show_feature(cfg.feature_id, cfg.sel, result, buf, ...
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
4852 | flags);
| ~~~~~~
../nvme.c: In function ‘get_feature’:
../nvme.c:4874:15: note: ‘result’ was declared here
4874 | __u64 result;
| ^~~~~~
Signed-off-by: Tokunori Ikegami <[email protected]>1 parent bd8271a commit e34bace
1 file changed
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4871 | 4871 | | |
4872 | 4872 | | |
4873 | 4873 | | |
4874 | | - | |
| 4874 | + | |
4875 | 4875 | | |
4876 | 4876 | | |
4877 | 4877 | | |
| |||
0 commit comments