Page MenuHomeFreeBSD

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

Authored by jrtc27_jrtc27.com on Sun, Oct 6, 2:36 PM.

Details

Reviewers
imp
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 OK
Unit
No Unit Test Coverage
Build Status
Buildable 26896
Build 25207: arc lint + arc unit

Event Timeline

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

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