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
Unknown Object (File)
Mon, Aug 4, 5:02 AM
Unknown Object (File)
Sun, Jul 27, 10:37 AM
Unknown Object (File)
Wed, Jul 16, 2:47 AM
Unknown Object (File)
Jul 5 2025, 7:02 AM
Unknown Object (File)
Jul 1 2025, 2:42 AM
Unknown Object (File)
Jun 30 2025, 9:08 PM
Unknown Object (File)
Jun 18 2025, 11:40 PM
Unknown Object (File)
Jun 17 2025, 1:32 PM
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.