Commit 32f3c53
committed
tree: always initialize ns variable
With some more aggressive CFLAGS/LDFLAGS optimized for size the compiler
gets confused and can't figure out if 'n' is initialized or not.
../libnvme/src/nvme/tree.c: In function ‘__nvme_scan_namespace’:
../libnvme/src/nvme/tree.c:2598:22: error: ‘n’ may be used uninitialized [-Werror=maybe-uninitialized]
2598 | n->sysfs_dir = path;
| ~~~~~~~~~~~~~^~~~~~
../libnvme/src/nvme/tree.c:2583:25: note: ‘n’ was declared here
2583 | struct nvme_ns *n;
| ^
Signed-off-by: Daniel Wagner <[email protected]>1 parent 9d031be commit 32f3c53
1 file changed
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2573 | 2573 | | |
2574 | 2574 | | |
2575 | 2575 | | |
2576 | | - | |
| 2576 | + | |
2577 | 2577 | | |
2578 | 2578 | | |
2579 | 2579 | | |
| |||
0 commit comments