VirtualBox

Ignore:
Timestamp:
Mar 13, 2014 3:45:46 PM (11 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
92791
Message:

remove unnamed unions

Location:
trunk/src/VBox/HostServices/SharedOpenGL/crserverlib
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/HostServices/SharedOpenGL/crserverlib/server_main.c

    r50754 r50773  
    32383238            {
    32393239            /* success */
    3240                 pCmd->i8Result = 0;
     3240                pCmd->u.i8Result = 0;
    32413241            }
    32423242            else
    32433243            {
    32443244                crWarning("crVBoxServerCmdVbvaCrCmdProcess failed, rc %d", rc);
    3245                 pCmd->i8Result = -1;
     3245                pCmd->u.i8Result = -1;
    32463246            }
    32473247            break;
     
    32543254        default:
    32553255            WARN(("unsupported command"));
    3256             pCmd->i8Result = -1;
     3256            pCmd->u.i8Result = -1;
    32573257    }
    32583258    return VINF_SUCCESS;
  • trunk/src/VBox/HostServices/SharedOpenGL/crserverlib/server_presenter.cpp

    r50754 r50773  
    248248    Assert(srcX >= 0);
    249249    Assert(srcY >= 0);
    250     Assert(srcX < pSrc->width);
    251     Assert(srcY < pSrc->height);
     250    Assert(srcX < (int32_t)pSrc->width);
     251    Assert(srcY < (int32_t)pSrc->height);
    252252
    253253    int32_t dstX = pCopyRect->xLeft - pDstDataPoint->x;
     
    259259    uint8_t *pu8Dst = ((uint8_t*)pDst->pvData) + pDst->pitch * dstY + dstX * 4;
    260260
    261     crFbBltMem(pu8Src, fSrcInvert ? -pSrc->pitch : pSrc->pitch, pu8Dst, pDst->pitch, pCopyRect->xRight - pCopyRect->xLeft, pCopyRect->yBottom - pCopyRect->yTop);
     261    crFbBltMem(pu8Src, fSrcInvert ? -((int32_t)pSrc->pitch) : (int32_t)pSrc->pitch, pu8Dst, pDst->pitch, pCopyRect->xRight - pCopyRect->xLeft, pCopyRect->yBottom - pCopyRect->yTop);
    262262}
    263263
     
    268268    Assert(srcX >= 0);
    269269    Assert(srcY >= 0);
    270     Assert(srcX < pSrc->width);
    271     Assert(srcY < pSrc->height);
     270    Assert(srcX < (int32_t)pSrc->width);
     271    Assert(srcY < (int32_t)pSrc->height);
    272272
    273273    RTPOINT ScaledDtsDataPoint;
     
    316316                        ScaledDstHeight,
    317317                        pu8Src,
    318                         fSrcInvert ? -pSrc->pitch : pSrc->pitch,
     318                        fSrcInvert ? -((int32_t)pSrc->pitch) : (int32_t)pSrc->pitch,
    319319                        pCopyRect->xRight - pCopyRect->xLeft, pCopyRect->yBottom - pCopyRect->yTop);
    320320}
     
    38253825static HCR_FRAMEBUFFER crPMgrFbGetNextEnabled(uint32_t i)
    38263826{
    3827     for (;i < cr_server.screenCount; ++i)
     3827    for (;i < (uint32_t)cr_server.screenCount; ++i)
    38283828    {
    38293829        HCR_FRAMEBUFFER hFb = CrPMgrFbGetEnabled(i);
     
    38373837static HCR_FRAMEBUFFER crPMgrFbGetNextInitialized(uint32_t i)
    38383838{
    3839     for (;i < cr_server.screenCount; ++i)
     3839    for (;i < (uint32_t)cr_server.screenCount; ++i)
    38403840    {
    38413841        HCR_FRAMEBUFFER hFb = CrPMgrFbGetInitialized(i);
     
    41854185void CrPMgrHlpGlblUpdateEnd(CR_FBMAP *pMap)
    41864186{
    4187     for (uint32_t i = 0; i < cr_server.screenCount; ++i)
     4187    for (uint32_t i = 0; i < (uint32_t)cr_server.screenCount; ++i)
    41884188    {
    41894189        if (!CrFBmIsSet(pMap, i))
     
    46544654    {
    46554655        VBOXCMDVBVA_BLT_PRIMARY *pBlt = (VBOXCMDVBVA_BLT_PRIMARY*)pCmd;
    4656         uint8_t u8PrimaryID = pBlt->Hdr.u8PrimaryID;
     4656        uint8_t u8PrimaryID = pBlt->Hdr.u.u8PrimaryID;
    46574657        HCR_FRAMEBUFFER hFb = CrPMgrFbGetEnabled(u8PrimaryID);
    46584658        if (!hFb)
    46594659        {
    46604660            WARN(("request to present on disabled framebuffer, ignore"));
    4661             pCmd->i8Result = -1;
     4661            pCmd->u.i8Result = -1;
    46624662            return VINF_SUCCESS;
    46634663        }
     
    46774677                WARN(("RTMemAlloc failed!"));
    46784678                g_CrPresenter.cbTmpBuf = 0;
    4679                 pCmd->i8Result = -1;
     4679                pCmd->u.i8Result = -1;
    46804680                return VINF_SUCCESS;
    46814681            }
     
    46974697                {
    46984698                    /* TexPresent */
    4699                     texId = pBlt->alloc.id;
     4699                    texId = pBlt->alloc.u.id;
    47004700                }
    47014701                else
    47024702                {
    4703                     VBOXCMDVBVAOFFSET offVRAM = pBlt->alloc.offVRAM;
     4703                    VBOXCMDVBVAOFFSET offVRAM = pBlt->alloc.u.offVRAM;
    47044704                    const VBVAINFOSCREEN *pScreen = CrFbGetScreenInfo(hFb);
    47054705                    uint32_t cbScreen = pScreen->u32LineSize * pScreen->u32Height;
     
    47084708                    {
    47094709                        WARN(("invalid param"));
    4710                         pCmd->i8Result = -1;
     4710                        pCmd->u.i8Result = -1;
    47114711                        return VINF_SUCCESS;
    47124712                    }
     
    47244724                /* blit from one primary to another primary, wow */
    47254725                WARN(("not implemented"));
    4726                 pCmd->i8Result = -1;
     4726                pCmd->u.i8Result = -1;
    47274727                return VINF_SUCCESS;
    47284728            }
     
    47344734            if (u8Flags & VBOXCMDVBVA_OPF_ALLOC_DSTID)
    47354735            {
    4736                 uint32_t texId = pBlt->alloc.id;
     4736                uint32_t texId = pBlt->alloc.u.id;
    47374737                WARN(("not implemented"));
    4738                 pCmd->i8Result = -1;
     4738                pCmd->u.i8Result = -1;
    47394739                return VINF_SUCCESS;
    47404740            }
    47414741            else
    47424742            {
    4743                 VBOXCMDVBVAOFFSET offVRAM = pBlt->alloc.offVRAM;
     4743                VBOXCMDVBVAOFFSET offVRAM = pBlt->alloc.u.offVRAM;
    47444744                const VBVAINFOSCREEN *pScreen = CrFbGetScreenInfo(hFb);
    47454745                uint32_t cbScreen = pScreen->u32LineSize * pScreen->u32Height;
     
    47484748                {
    47494749                    WARN(("invalid param"));
    4750                     pCmd->i8Result = -1;
     4750                    pCmd->u.i8Result = -1;
    47514751                    return VINF_SUCCESS;
    47524752                }
     
    47704770                {
    47714771                    WARN(("CrFbBltGetContents failed %d", rc));
    4772                     pCmd->i8Result = -1;
     4772                    pCmd->u.i8Result = -1;
    47734773                    return VINF_SUCCESS;
    47744774                }
     
    47794779    {
    47804780        WARN(("not implemented"));
    4781         pCmd->i8Result = -1;
    4782         return VINF_SUCCESS;
    4783     }
    4784 
    4785     pCmd->i8Result = 0;
     4781        pCmd->u.i8Result = -1;
     4782        return VINF_SUCCESS;
     4783    }
     4784
     4785    pCmd->u.i8Result = 0;
    47864786    return VINF_SUCCESS;
    47874787}
Note: See TracChangeset for help on using the changeset viewer.

© 2025 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette