Page MenuHomeFreeBSD

[nvmecontrol] Fix type signedness warning-to-error on gcc-6.4
ClosedPublic

Authored by adrian on Oct 15 2020, 4:45 AM.
Tags
None
Referenced Files
Unknown Object (File)
Sat, Nov 16, 3:34 AM
Unknown Object (File)
Thu, Nov 14, 8:13 AM
Unknown Object (File)
Mon, Nov 4, 1:50 PM
Unknown Object (File)
Sat, Nov 2, 7:32 PM
Unknown Object (File)
Oct 16 2024, 7:20 AM
Unknown Object (File)
Oct 13 2024, 8:03 AM
Unknown Object (File)
Sep 27 2024, 12:53 PM
Unknown Object (File)
Sep 24 2024, 9:54 PM
Subscribers

Details

Summary

This fixes a type signedness comparison warning-to-error on
gcc-6.4. The ternary operation casts it right but the actual
assignment doesn't.

Test Plan
  • compiled on gcc-6.4 amd64

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 34785
Build 31834: arc lint + arc unit

Event Timeline

sbin/nvmecontrol/firmware.c
180

I think it would be better to have a new variable that's the right size rather than all the casts.

Updated to reduce casting and use better variable types

Whoops, remove another cast

adrian marked an inline comment as done.
This revision is now accepted and ready to land.Nov 16 2020, 4:42 AM