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
F83595132: D21912.id62961.diff
Sun, May 12, 10:24 AM
Unknown Object (File)
Fri, May 10, 1:18 PM
Unknown Object (File)
Fri, May 10, 12:52 PM
Unknown Object (File)
Tue, May 7, 12:56 PM
Unknown Object (File)
Sun, May 5, 10:25 AM
Unknown Object (File)
Mon, Apr 29, 2:12 PM
Unknown Object (File)
Feb 8 2024, 4:52 AM
Unknown Object (File)
Dec 20 2023, 2:15 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.