Opened 8 years ago

Closed 8 years ago

#12822 closed bug (fixed)

[Patch] xhci.cpp: Fix -Wtautological-constant-out-of-range-compare

Reported by: mt Owned by: korli
Priority: normal Milestone: Unscheduled
Component: Drivers/USB/XHCI Version: R1/Development
Keywords: Cc:
Blocked By: Blocking:
Platform: All

Description

In xhci.cpp, clang warns '-Wtautological-constant-out-of-range-compare'. I think we may change fScratchpadCount size to compare with XHCI_MAX_SCRATCHPADS.

/home/haiku/haiku/haiku/src/add-ons/kernel/busses/usb/xhci.cpp:427:23: warning: comparison of constant 1024 with expression of type 'uint8' (aka 'unsigned char') is always false [-Wtautological-constant-out-of-range-compare]
        if (fScratchpadCount > XHCI_MAX_SCRATCHPADS) {
            ~~~~~~~~~~~~~~~~ ^ ~~~~~~~~~~~~~~~~~~~~

Attachments (1)

0010-Increase-fScratchpadCount-size.patch (860 bytes ) - added by mt 8 years ago.

Download all attachments as: .zip

Change History (3)

comment:1 by mt, 8 years ago

patch: 01

comment:2 by korli, 8 years ago

Resolution: fixed
Status: newclosed

Applied with a build fix in hrev50365. Thanks!

Note: See TracTickets for help on using tickets.