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)
Oct 20 2024, 4:15 PM
Unknown Object (File)
Oct 20 2024, 4:14 PM
Unknown Object (File)
Oct 20 2024, 4:14 PM
Unknown Object (File)
Sep 30 2024, 7:26 PM
Unknown Object (File)
Sep 26 2024, 6:11 PM
Unknown Object (File)
Sep 17 2024, 1:26 AM
Unknown Object (File)
Sep 8 2024, 8:48 AM
Unknown Object (File)
Sep 7 2024, 2:43 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

Repository
rS FreeBSD src repository - subversion
Lint
Lint Not Applicable
Unit
Tests Not Applicable

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.