Page MenuHomeFreeBSD

nda(4): Remove unnecessary union and avoid Clang -Wsizeof-array-div warning
ClosedPublic

Authored by jrtc27 on Oct 6 2019, 2:36 PM.
Tags
None
Referenced Files
F131573843: D21912.diff
Thu, Oct 9, 9:55 AM
Unknown Object (File)
Tue, Oct 7, 4:16 PM
Unknown Object (File)
Sat, Oct 4, 11:32 PM
Unknown Object (File)
Tue, Sep 23, 5:53 PM
Unknown Object (File)
Fri, Sep 19, 8:16 AM
Unknown Object (File)
Sun, Sep 14, 1:11 AM
Unknown Object (File)
Thu, Sep 11, 7:45 AM
Unknown Object (File)
Wed, Sep 10, 1:56 AM
Subscribers
None

Details

Summary

Clang trunk recently gained this new warning, and complains about the
sizeof(trim->data) / sizeof(struct nvme_dsm_range) expression, since
the left hand side's element type (char) does not match the right hand
side's type. The byte buffer is unnecessary so we can remove it to clean
up the code and fix the warning at the same time.

No functional change.

Diff Detail

Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 26896
Build 25207: arc lint + arc unit

Event Timeline

This revision is now accepted and ready to land.Oct 7 2019, 12:55 AM

Could you please commit this if you believe it is ready to land? Thanks.