VirtualBox

Ignore:
Timestamp:
Oct 21, 2024 12:29:15 PM (3 months ago)
Author:
vboxsync
Message:

IPRT: Fixed warnings in ASMBitFirstClear/Set-generic.cpp. jiraref:VBP=1171

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Runtime/common/asm/ASMBitFirstClear-generic.cpp

    r106559 r106561  
    5959        {
    6060            size_t const iBaseBit = ((uintptr_t)pu - (uintptr_t)pvBitmap) * 8;
    61             return iBaseBit + ASMBitFirstSetU32(~RT_LE2H_U32(u32)) - 1;
     61            return (int32_t)(iBaseBit + ASMBitFirstSetU32(~RT_LE2H_U32(u32)) - 1);
    6262        }
    6363        pu     = (const volatile size_t RT_FAR *)((uintptr_t)pu + sizeof(uint32_t));
     
    7676            size_t const iBaseBit = ((uintptr_t)pu - (uintptr_t)pvBitmap) * 8;
    7777#if ARCH_BITS == 32
    78             return iBaseBit + ASMBitFirstSetU32(~RT_LE2H_U32(u)) - 1;
     78            return (int32_t)(iBaseBit + ASMBitFirstSetU32(~RT_LE2H_U32(u)) - 1);
    7979#elif ARCH_BITS == 64
    80             return iBaseBit + ASMBitFirstSetU64(~RT_LE2H_U64(u)) - 1;
     80            return (int32_t)(iBaseBit + ASMBitFirstSetU64(~RT_LE2H_U64(u)) - 1);
    8181#else
    8282# error "ARCH_BITS is not supported"
     
    9898        {
    9999            size_t const iBaseBit = ((uintptr_t)pu - (uintptr_t)pvBitmap) * 8;
    100             return iBaseBit + ASMBitFirstSetU32(~RT_LE2H_U32(u32)) - 1;
     100            return (int32_t)(iBaseBit + ASMBitFirstSetU32(~RT_LE2H_U32(u32)) - 1);
    101101        }
    102102    }
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