VirtualBox

Changeset 62808 in vbox for trunk/src/VBox


Ignore:
Timestamp:
Aug 1, 2016 12:05:40 PM (8 years ago)
Author:
vboxsync
Message:

packer/pack_client.c: Don't use 'unsigned long' for pointer casting, use 'uintptr_t'.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/GuestHost/OpenGL/packer/pack_client.c

    r52887 r62808  
    3636    {
    3737        Assert(((uintptr_t)p) < array->a[attr].buffer->size);
    38         p = (unsigned char *)(array->a[attr].buffer->data) + (unsigned long)p;
     38        p = (unsigned char *)(array->a[attr].buffer->data) + (uintptr_t)p;
    3939    }
    4040#endif
     
    319319        if (array->n.buffer && array->n.buffer->data)
    320320        {
    321             p = (unsigned char *)(array->n.buffer->data) + (unsigned long)p;
     321            p = (unsigned char *)(array->n.buffer->data) + (uintptr_t)p;
    322322        }
    323323#endif
     
    342342        if (array->c.buffer && array->c.buffer->data)
    343343        {
    344             p = (unsigned char *)(array->c.buffer->data) + (unsigned long)p;
     344            p = (unsigned char *)(array->c.buffer->data) + (uintptr_t)p;
    345345        }
    346346#endif
     
    417417        if (array->s.buffer && array->s.buffer->data)
    418418        {
    419             p = (unsigned char *)(array->s.buffer->data) + (unsigned long)p;
     419            p = (unsigned char *)(array->s.buffer->data) + (uintptr_t)p;
    420420        }
    421421#endif
     
    454454        if (array->f.buffer && array->f.buffer->data)
    455455        {
    456             p = (unsigned char *)(array->f.buffer->data) + (unsigned long)p;
     456            p = (unsigned char *)(array->f.buffer->data) + (uintptr_t)p;
    457457        }
    458458#endif
     
    470470            if (array->t[unit].buffer && array->t[unit].buffer->data)
    471471            {
    472                 p = (unsigned char *)(array->t[unit].buffer->data) + (unsigned long)p;
     472                p = (unsigned char *)(array->t[unit].buffer->data) + (uintptr_t)p;
    473473            }
    474474#endif
     
    525525        if (array->i.buffer && array->i.buffer->data)
    526526        {
    527             p = (unsigned char *)(array->i.buffer->data) + (unsigned long)p;
     527            p = (unsigned char *)(array->i.buffer->data) + (uintptr_t)p;
    528528        }
    529529#endif
     
    547547        if (array->e.buffer && array->e.buffer->data)
    548548        {
    549             p = (unsigned char *)(array->e.buffer->data) + (unsigned long)p;
     549            p = (unsigned char *)(array->e.buffer->data) + (uintptr_t)p;
    550550        }
    551551#endif
     
    577577        if (array->v.buffer && array->v.buffer->data)
    578578        {
    579             p = (unsigned char *)(array->v.buffer->data) + (unsigned long)p;
     579            p = (unsigned char *)(array->v.buffer->data) + (uintptr_t)p;
    580580        }
    581581#endif
     
    796796    if (elementsBuffer && elementsBuffer->data)
    797797    {
    798         p = (unsigned char *)(elementsBuffer->data) + (unsigned long)p;
     798        p = (unsigned char *)(elementsBuffer->data) + (uintptr_t)p;
    799799    }
    800800#endif
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