Actions
Bug #15493
closedzfs: 'spare_guid' may be used uninitialized
Start date:
Due date:
% Done:
100%
Estimated time:
Difficulty:
Bite-size
Tags:
Gerrit CR:
External Bug:
Description
Build error with gcc 12:
../../common/fs/zfs/vdev_label.c: In function 'vdev_label_init': ../../common/fs/zfs/vdev_label.c:988:24: error: 'spare_guid' may be used uninitialized [-Werror=maybe-uninitialized] 988 | spare_guid != 0ULL) { | ~~~~~~~~~~~^~~~~~~ ../../common/fs/zfs/vdev_label.c:952:18: note: 'spare_guid' declared here 952 | uint64_t spare_guid, l2cache_guid; | ^~~~~~~~~~ cc1: all warnings being treated as errors
Just set it 0. I also did check OpenZFS for this fix, apparently they have done one relatively large update but our build environment has not revealed more issues (for example, they also set l2cache_guid = 0 above).
Testing done: have used this patch in my build host and test vm's without issues.
Updated by Toomas Soome about 1 month ago
- Description updated (diff)
- Status changed from In Progress to Pending RTI
Updated by Electric Monk about 1 month ago
- Status changed from Pending RTI to Closed
- % Done changed from 90 to 100
git commit 74009d0f8c9141449bd5289f171b1b220fd1d1e3
commit 74009d0f8c9141449bd5289f171b1b220fd1d1e3 Author: Toomas Soome <tsoome@me.com> Date: 2023-05-08T16:04:00.000Z 15493 zfs: 'spare_guid' may be used uninitialized Reviewed by: Dan Cross <cross@oxidecomputer.com> Approved by: Dan McDonald <danmcd@mnx.io>
Actions