Page MenuHomeFreeBSD

bsdinstall: Remove set but unused variable.
AbandonedPublic

Authored by jhb on Jun 20 2023, 4:33 PM.
Tags
None
Referenced Files
F136172218: D40659.id123534.diff
Sun, Nov 16, 10:18 AM
F136134215: D40659.id.diff
Sun, Nov 16, 1:38 AM
Unknown Object (File)
Fri, Nov 14, 11:13 AM
Unknown Object (File)
Fri, Nov 14, 5:37 AM
Unknown Object (File)
Fri, Nov 14, 3:45 AM
Unknown Object (File)
Sun, Nov 9, 1:16 AM
Unknown Object (File)
Wed, Nov 5, 5:21 PM
Unknown Object (File)
Mon, Nov 3, 1:39 AM
Subscribers

Details

Reviewers
nwhitehorn
Summary

Other places in this code do not check the return value of
geom_gettree so just remove the variable to stay consistent.

While here, fix a nearby style bug.

Reported by: GCC

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Skipped
Unit
Tests Skipped
Build Status
Buildable 52194
Build 49085: arc lint + arc unit

Event Timeline

jhb requested review of this revision.Jun 20 2023, 4:33 PM
emaste added inline comments.
usr.sbin/bsdinstall/partedit/scripted.c
77

maybe we should handle the error instead?
will provider_for_name handle the case that geom_gettree failed?

Possibly we could add the error handling, but it's not something we've needed since bsdinstall was written?

usr.sbin/bsdinstall/partedit/scripted.c
100

We don't handle the error here.

187

Or here.

usr.sbin/bsdinstall/partedit/scripted.c
77

See D40779 for an alternate version that tries to handle the errors (though there isn't really a good recourse if this fails in most cases)