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)
Tue, Oct 7, 4:16 PM
Unknown Object (File)
Sat, Oct 4, 11:32 PM
Unknown Object (File)
Tue, Sep 23, 5:53 PM
Unknown Object (File)
Fri, Sep 19, 8:16 AM
Unknown Object (File)
Sun, Sep 14, 1:11 AM
Unknown Object (File)
Thu, Sep 11, 7:45 AM
Unknown Object (File)
Wed, Sep 10, 1:56 AM
Unknown Object (File)
Aug 17 2025, 7:00 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.