Page MenuHomeFreeBSD

libsa: Disable -Wdangling-pointer for zfs.c.
ClosedPublic

Authored by jhb on Nov 29 2022, 7:50 PM.
Tags
None
Referenced Files
F171501894: D37533.diff
Fri, Sep 11, 12:25 PM
Unknown Object (File)
Sat, Sep 5, 9:54 PM
Unknown Object (File)
Sat, Aug 15, 9:03 AM
Unknown Object (File)
Fri, Aug 14, 1:10 AM
Unknown Object (File)
Thu, Aug 13, 8:43 PM
Unknown Object (File)
Thu, Aug 13, 8:23 PM
Unknown Object (File)
Aug 12 2026, 2:34 PM
Unknown Object (File)
Aug 10 2026, 4:49 PM
Subscribers

Details

Summary

GCC 12 warns about a dangling pointer to 'objid' in
zfs_bootenv_initial(). However, this appears to be a false positive
as the pointer to 'objid' is only passed to zfs_lookup_dataset() but
not saved anywhere that outlives the lifetime of the
zfs_bootenv_initial() function.

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

jhb requested review of this revision.Nov 29 2022, 7:50 PM
This revision is now accepted and ready to land.Nov 29 2022, 8:14 PM

Is it worth mentioning the false positive in a src comment?

Is it worth mentioning the false positive in a src comment?

I think the ZFS code is the vendor OpenZFS code so would be a local diff, so probably not.

This revision was automatically updated to reflect the committed changes.