Bug #15493
Updated by Toomas Soome 5 months ago
Build error with gcc 12:
<pre>
../../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
</pre>
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.