VirtualBox

Changeset 49491 in vbox


Ignore:
Timestamp:
Nov 15, 2013 10:11:42 AM (11 years ago)
Author:
vboxsync
Message:

libs/xpcom: fixed a bunch of pointer size vs. integer size warnings

Location:
trunk/src/libs/xpcom18a4
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/libs/xpcom18a4/nsprpub/pr/src/misc/prnetdb.c

    r46043 r49491  
    21362136    if (!_pr_ipv6_is_present) {
    21372137        /* using PRAddrInfoFB */
    2138         PRIntn iter = (PRIntn) iterPtr;
     2138        PRIntn iter = (PRIntn)(uintptr_t)iterPtr;
    21392139        iter = PR_EnumerateHostEnt(iter, &((PRAddrInfoFB *) base)->hostent, port, result);
    21402140        if (iter < 0)
    21412141            iter = 0;
    2142         return (void *) iter;
     2142        return (void *)(uintptr_t)iter;
    21432143    }
    21442144#endif
  • trunk/src/libs/xpcom18a4/xpcom/ds/nsCheapSets.h

    r21113 r49491  
    176176  void SetInt(PRInt32 aInt)
    177177  {
    178     mValOrHash = (void*)((aInt << 1) | 0x1);
     178    mValOrHash = (void*)(uintptr_t)((aInt << 1) | 0x1);
    179179  }
    180180  /** Create the hash and initialize */
  • trunk/src/libs/xpcom18a4/xpcom/ds/pldhash.c

    r31259 r49491  
    104104PL_DHashVoidPtrKeyStub(PLDHashTable *table, const void *key)
    105105{
    106     return (PLDHashNumber)key >> 2;
     106    return (PLDHashNumber)(uintptr_t)key >> 2;
    107107}
    108108
  • trunk/src/libs/xpcom18a4/xpcom/io/nsFastLoadService.cpp

    r21113 r49491  
    398398    mChecksumTable.Put(&key, NS_INT32_TO_PTR(checksum));
    399399#else /* VBOX */
    400     mChecksumTable.Put(&key, (void *)checksum);
     400    mChecksumTable.Put(&key, (void *)(uintptr_t)checksum);
    401401#endif /* VBOX */
    402402    *aChecksum = checksum;
     
    425425    mChecksumTable.Put(&key, NS_INT32_TO_PTR(checksum));
    426426#else /* VBOX */
    427     mChecksumTable.Put(&key, (void *)checksum);
     427    mChecksumTable.Put(&key, (void *)(uintptr_t)checksum);
    428428#endif /* VBOX */
    429429    return NS_OK;
  • trunk/src/libs/xpcom18a4/xpcom/tests/TestThreads.cpp

    r1 r49491  
    216216        for (k = 0; k < threads; k++) {
    217217            array[k] = PR_CreateThread(PR_USER_THREAD,
    218                                        threadProc, (void*) k,
     218                                       threadProc, (void*)(uintptr_t)k,
    219219                                       PR_PRIORITY_NORMAL,
    220220                                       PR_GLOBAL_THREAD,
  • trunk/src/libs/xpcom18a4/xpcom/typelib/xpt/src/xpt_xdr.c

    r1 r49491  
    144144XPT_HashTableAdd(XPTHashTable *table, void *key, void *value) {
    145145    XPTHashRecord **bucketloc = table->buckets +
    146         (((PRUint32)key) % XPT_HASHSIZE);
     146        (((PRUint32)(uintptr_t)key) % XPT_HASHSIZE);
    147147    XPTHashRecord *bucket;
    148148
     
    160160static void *
    161161XPT_HashTableLookup(XPTHashTable *table, void *key) {
    162     XPTHashRecord *bucket = table->buckets[(PRUint32)key % XPT_HASHSIZE];
     162    XPTHashRecord *bucket = table->buckets[(PRUint32)(uintptr_t)key % XPT_HASHSIZE];
    163163    while (bucket != NULL) {
    164164        if (bucket->key == key)
     
    484484XPT_GetOffsetForAddr(XPTCursor *cursor, void *addr)
    485485{
    486     return (PRUint32)XPT_HashTableLookup(cursor->state->pool->offset_map, addr);
     486    return (PRUint32)(uintptr_t)XPT_HashTableLookup(cursor->state->pool->offset_map, addr);
    487487}
    488488
     
    491491{
    492492    return XPT_HashTableAdd(cursor->state->pool->offset_map,
    493                             addr, (void *)offset) != NULL;
     493                            addr, (void *)(uintptr_t)offset) != NULL;
    494494}
    495495
     
    498498{
    499499    return XPT_HashTableAdd(cursor->state->pool->offset_map,
    500                             (void *)offset, addr) != NULL;
     500                            (void *)(uintptr_t)offset, addr) != NULL;
    501501}
    502502
     
    504504XPT_GetAddrForOffset(XPTCursor *cursor, PRUint32 offset)
    505505{
    506     return XPT_HashTableLookup(cursor->state->pool->offset_map, (void *)offset);
     506    return XPT_HashTableLookup(cursor->state->pool->offset_map, (void *)(uintptr_t)offset);
    507507}
    508508
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