VirtualBox

Changeset 89937 in vbox for trunk/src/VBox/Devices/Input


Ignore:
Timestamp:
Jun 29, 2021 6:53:59 AM (4 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
145395
Message:

Warnings.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Devices/Input/UsbKbd.cpp

    r89935 r89937  
    462462    else if (u8HidPage == USB_HID_CC_PAGE)
    463463    {
    464         for (int i = 0; i < RT_ELEMENTS(aHidCCKeys); ++i)
     464        for (unsigned i = 0; i < RT_ELEMENTS(aHidCCKeys); ++i)
    465465            if (aHidCCKeys[i] == u16HidUsage)
    466466            {
     
    472472    else if (u8HidPage == USB_HID_DC_PAGE)
    473473    {
    474         for (int i = 0; i < RT_ELEMENTS(aHidDCKeys); ++i)
     474        for (unsigned i = 0; i < RT_ELEMENTS(aHidDCKeys); ++i)
    475475            if (aHidCCKeys[i] == u16HidUsage)
    476476            {
     
    499499 * @param   u32HidCode          32-bit USB HID code.
    500500 */
    501 static uint32_t usbInternalCodeToHid(int iKeyCode)
     501static uint32_t usbInternalCodeToHid(unsigned uKeyCode)
    502502{
    503503    uint16_t    u16HidUsage;
    504504    uint32_t    u32HidCode = 0;
    505505
    506     if ((iKeyCode >= USBHID_PAGE_DC_START) && (iKeyCode <= USBHID_PAGE_DC_END))
    507     {
    508         u16HidUsage = aHidDCKeys[iKeyCode - USBHID_PAGE_DC_START];
     506    if ((uKeyCode >= USBHID_PAGE_DC_START) && (uKeyCode <= USBHID_PAGE_DC_END))
     507    {
     508        u16HidUsage = aHidDCKeys[uKeyCode - USBHID_PAGE_DC_START];
    509509        u32HidCode  = RT_MAKE_U32(u16HidUsage, USB_HID_DC_PAGE);
    510510    }
    511     else if ((iKeyCode >= USBHID_PAGE_CC_START) && (iKeyCode <= USBHID_PAGE_CC_END))
    512     {
    513         u16HidUsage = aHidCCKeys[iKeyCode - USBHID_PAGE_CC_START];
     511    else if ((uKeyCode >= USBHID_PAGE_CC_START) && (uKeyCode <= USBHID_PAGE_CC_END))
     512    {
     513        u16HidUsage = aHidCCKeys[uKeyCode - USBHID_PAGE_CC_START];
    514514        u32HidCode  = RT_MAKE_U32(u16HidUsage, USB_HID_CC_PAGE);
    515515    }
    516516    else    /* Must be the keyboard usage page. */
    517517    {
    518         if (iKeyCode <= VBOX_USB_MAX_USAGE_CODE)
    519             u32HidCode = RT_MAKE_U32(iKeyCode, USB_HID_KB_PAGE);
     518        if (uKeyCode <= VBOX_USB_MAX_USAGE_CODE)
     519            u32HidCode = RT_MAKE_U32(uKeyCode, USB_HID_KB_PAGE);
    520520        else
    521             AssertMsgFailed(("iKeyCode out of range! (%d)\n", iKeyCode));
     521            AssertMsgFailed(("uKeyCode out of range! (%u)\n", uKeyCode));
    522522    }
    523523
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette