Page MenuHomeFreeBSD

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

Authored by jrtc27 on Oct 6 2019, 2:36 PM.



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

rS FreeBSD src repository
Automatic diff as part of commit; lint not applicable.
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

jrtc27 created this revision.Oct 6 2019, 2:36 PM
imp accepted this revision.Oct 7 2019, 12:55 AM
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.