Page MenuHomeFreeBSD

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

Authored by jhb on Nov 29 2022, 7:50 PM.
Tags
None
Referenced Files
F163651060: D37533.id113808.diff
Sat, Jul 25, 4:49 AM
F163628307: D37533.id113808.diff
Fri, Jul 24, 11:54 PM
F163571969: D37533.id.diff
Fri, Jul 24, 3:01 PM
Unknown Object (File)
Wed, Jul 22, 12:04 PM
Unknown Object (File)
Tue, Jul 21, 12:44 PM
Unknown Object (File)
Tue, Jul 21, 3:05 AM
Unknown Object (File)
Wed, Jul 8, 5:22 AM
Unknown Object (File)
Thu, Jun 25, 8:25 AM
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 Skipped
Unit
Tests Skipped
Build Status
Buildable 48534
Build 45420: arc lint + arc unit

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.