VirtualBox

Changeset 769 in vbox for trunk/src/VBox/Additions


Ignore:
Timestamp:
Feb 8, 2007 10:31:15 AM (18 years ago)
Author:
vboxsync
Message:

Prevent some warnings as these files are compiled as .c files on Linux now.

Location:
trunk/src/VBox/Additions/common/VBoxGuestLib
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Additions/common/VBoxGuestLib/HGCM.cpp

    r719 r769  
    9191    struct VBGLHGCMHANDLEDATA *p;
    9292    int rc = vbglHandleHeapEnter ();
     93    uint32_t i;
    9394
    9495    if (VBOX_FAILURE (rc))
    95     {
    9696        return NULL;
    97     }
    9897
    9998    p = NULL;
     
    102101     * @todo bitmap for faster search and other obvious optimizations.
    103102     */
    104 
    105     uint32_t i;
    106103
    107104    for (i = 0; i < ELEMENTS(g_vbgldata.aHGCMHandleData); i++)
     
    110107        {
    111108            p = &g_vbgldata.aHGCMHandleData[i];
    112 
    113109            p->fAllocated = 1;
    114 
    115110            break;
    116111        }
     
    130125
    131126    if (!pHandle)
    132     {
    133127       return;
    134     }
    135128
    136129    rc = vbglHandleHeapEnter ();
    137130
    138131    if (VBOX_FAILURE (rc))
    139     {
    140132        return;
    141     }
    142133
    143134    VBGL_HGCM_ASSERTMsg(pHandle->fAllocated,
     
    145136
    146137    memset(pHandle, 0, sizeof (struct VBGLHGCMHANDLEDATA));
    147 
    148138    vbglHandleHeapLeave ();
    149 
    150139    return;
    151140}
     
    157146
    158147    if (!pHandle || !pData)
    159     {
    160148        return VERR_INVALID_PARAMETER;
    161     }
    162149
    163150    pHandleData = vbglHGCMHandleAlloc ();
  • trunk/src/VBox/Additions/common/VBoxGuestLib/HGCMInternal.cpp

    r719 r769  
    5555{
    5656    VMMDevHGCMConnect *pHGCMConnect;
     57    int rc;
     58
    5759    if (!pConnectInfo || !pAsyncCallback)
    5860    {
     
    6365
    6466    /* Allocate request */
    65     int rc = VbglGRAlloc ((VMMDevRequestHeader **)&pHGCMConnect, sizeof (VMMDevHGCMConnect), VMMDevReq_HGCMConnect);
     67    rc = VbglGRAlloc ((VMMDevRequestHeader **)&pHGCMConnect, sizeof (VMMDevHGCMConnect), VMMDevReq_HGCMConnect);
    6668
    6769    if (VBOX_SUCCESS(rc))
     
    104106{
    105107    VMMDevHGCMDisconnect *pHGCMDisconnect;
     108    int rc;
     109
    106110    if (!pDisconnectInfo || !pAsyncCallback)
    107111    {
     
    112116
    113117    /* Allocate request */
    114     int rc = VbglGRAlloc ((VMMDevRequestHeader **)&pHGCMDisconnect, sizeof (VMMDevHGCMDisconnect), VMMDevReq_HGCMDisconnect);
     118    rc = VbglGRAlloc ((VMMDevRequestHeader **)&pHGCMDisconnect, sizeof (VMMDevHGCMDisconnect), VMMDevReq_HGCMDisconnect);
    115119
    116120    if (VBOX_SUCCESS(rc))
     
    147151{
    148152    VMMDevHGCMCall *pHGCMCall;
     153    uint32_t cbParms;
     154    int rc;
     155
    149156    if (!pCallInfo || !pAsyncCallback)
    150157    {
     
    156163    pHGCMCall = NULL;
    157164
    158     uint32_t cbParms = pCallInfo->cParms * sizeof (HGCMFunctionParameter);
     165    cbParms = pCallInfo->cParms * sizeof (HGCMFunctionParameter);
    159166
    160167    /* Allocate request */
    161     int rc = VbglGRAlloc ((VMMDevRequestHeader **)&pHGCMCall, sizeof (VMMDevHGCMCall) + cbParms, VMMDevReq_HGCMCall);
     168    rc = VbglGRAlloc ((VMMDevRequestHeader **)&pHGCMCall, sizeof (VMMDevHGCMCall) + cbParms, VMMDevReq_HGCMCall);
    162169
    163170    dprintf (("VbglHGCMCall Allocated gr %p, rc = %Vrc, cbParms = %d\n", pHGCMCall, rc, cbParms));
  • trunk/src/VBox/Additions/common/VBoxGuestLib/Init.cpp

    r1 r769  
    8686int VbglEnter (void)
    8787{
     88    int rc;
     89
    8890#ifndef VBGL_VBOXGUEST
    8991    if (g_vbgldata.status == VbglStatusInitializing)
     
    9395#endif
    9496
    95     int rc = g_vbgldata.status != VbglStatusNotInitialized? VINF_SUCCESS: VERR_VBGL_NOT_INITIALIZED;
     97    rc = g_vbgldata.status != VbglStatusNotInitialized? VINF_SUCCESS: VERR_VBGL_NOT_INITIALIZED;
    9698   
    9799    // dprintf(("VbglEnter: rc = %d\n", rc));
  • trunk/src/VBox/Additions/common/VBoxGuestLib/PhysHeap.cpp

    r719 r769  
    387387DECLVBGL(void *) VbglPhysHeapAlloc (uint32_t cbSize)
    388388{
    389     VBGLPHYSHEAPBLOCK *pBlock;
     389    VBGLPHYSHEAPBLOCK *pBlock, *iter;
    390390    int rc = vbglPhysHeapEnter ();
    391391
     
    400400
    401401    /* If there are free blocks in the heap, look at them. */
    402     VBGLPHYSHEAPBLOCK *iter = g_vbgldata.pFreeBlocksHead;
     402    iter = g_vbgldata.pFreeBlocksHead;
    403403
    404404    /* There will be not many blocks in the heap, so
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