VirtualBox

Changeset 85223 in vbox for trunk/include


Ignore:
Timestamp:
Jul 11, 2020 4:17:14 PM (5 years ago)
Author:
vboxsync
Message:

iprt/asm.h: Shut up sign conversion warnings. bugref:9790

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/include/iprt/asm.h

    r85087 r85223  
    31513151 * @remarks x86: Requires a 486 or later.
    31523152 */
    3153 DECLINLINE(int64_t) ASMAtomicIncZ(size_t volatile RT_FAR *pcb) RT_NOTHROW_DEF
     3153DECLINLINE(size_t) ASMAtomicIncZ(size_t volatile RT_FAR *pcb) RT_NOTHROW_DEF
    31543154{
    31553155#if ARCH_BITS == 64
     
    32923292 * @remarks x86: Requires a 486 or later.
    32933293 */
    3294 DECLINLINE(int64_t) ASMAtomicDecZ(size_t volatile RT_FAR *pcb) RT_NOTHROW_DEF
     3294DECLINLINE(size_t) ASMAtomicDecZ(size_t volatile RT_FAR *pcb) RT_NOTHROW_DEF
    32953295{
    32963296#if ARCH_BITS == 64
     
    33543354DECLINLINE(void) ASMAtomicOrS32(int32_t volatile RT_FAR *pi32, int32_t i32) RT_NOTHROW_DEF
    33553355{
    3356     ASMAtomicOrU32((uint32_t volatile RT_FAR *)pi32, i32);
     3356    ASMAtomicOrU32((uint32_t volatile RT_FAR *)pi32, (uint32_t)i32);
    33573357}
    33583358
     
    34033403DECLINLINE(void) ASMAtomicOrS64(int64_t volatile RT_FAR *pi64, int64_t i64) RT_NOTHROW_DEF
    34043404{
    3405     ASMAtomicOrU64((uint64_t volatile RT_FAR *)pi64, i64);
     3405    ASMAtomicOrU64((uint64_t volatile RT_FAR *)pi64, (uint64_t)i64);
    34063406}
    34073407
     
    35533553DECLINLINE(void) ASMAtomicUoOrS32(int32_t volatile RT_FAR *pi32, int32_t i32) RT_NOTHROW_DEF
    35543554{
    3555     ASMAtomicUoOrU32((uint32_t volatile RT_FAR *)pi32, i32);
     3555    ASMAtomicUoOrU32((uint32_t volatile RT_FAR *)pi32, (uint32_t)i32);
    35563556}
    35573557
     
    35993599DECLINLINE(void) ASMAtomicUoOrS64(int64_t volatile RT_FAR *pi64, int64_t i64) RT_NOTHROW_DEF
    36003600{
    3601     ASMAtomicUoOrU64((uint64_t volatile RT_FAR *)pi64, i64);
     3601    ASMAtomicUoOrU64((uint64_t volatile RT_FAR *)pi64, (uint64_t)i64);
    36023602}
    36033603
     
    48414841            }
    48424842
    4843             /* whole dword. */
     4843            /* whole dwords. */
    48444844            if (iBitStart != iEnd)
    4845                 ASMMemZero32(pu32, (iEnd - iBitStart) >> 3);
     4845                ASMMemZero32(pu32, ((uint32_t)iEnd - (uint32_t)iBitStart) >> 3);
    48464846
    48474847            /* bits in last dword. */
     
    48844884            /* whole dword. */
    48854885            if (iBitStart != iEnd)
    4886                 ASMMemFill32(pu32, (iEnd - iBitStart) >> 3, ~UINT32_C(0));
     4886                ASMMemFill32(pu32, ((uint32_t)iEnd - (uint32_t)iBitStart) >> 3, ~UINT32_C(0));
    48874887
    48884888            /* bits in last dword. */
     
    50295029#  endif
    50305030        if (iBit >= 0)
    5031             return iBit + iBitPrev;
     5031            return iBit + (int)iBitPrev;
    50325032# endif
    50335033
     
    51835183#  endif
    51845184        if (iBit >= 0)
    5185             return iBit + iBitPrev;
     5185            return iBit + (int)iBitPrev;
    51865186# endif
    51875187
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