VirtualBox

Ignore:
Timestamp:
Aug 4, 2016 11:14:14 PM (8 years ago)
Author:
vboxsync
Message:

GA/NT/Graphics: warnings

Location:
trunk/src/VBox/Additions/WINNT/Graphics/Video/disp/wddm
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Additions/WINNT/Graphics/Video/disp/wddm/VBoxD3DIf.cpp

    r62522 r63018  
    221221    if (!pRect)
    222222    {
    223         if (pAlloc->SurfDesc.pitch == pLockInfo->Pitch)
     223        if (pAlloc->SurfDesc.pitch == (UINT)pLockInfo->Pitch)
    224224        {
    225225            Assert(pAlloc->SurfDesc.cbSize);
     
    282282        }
    283283
    284         if (pRect->right - pRect->left == pAlloc->SurfDesc.width && srcPitch == dstPitch)
     284        if (pRect->right - pRect->left == (LONG)pAlloc->SurfDesc.width && srcPitch == dstPitch)
    285285        {
    286286            uint32_t cbSize = vboxWddmCalcSize(pAlloc->SurfDesc.pitch, pRect->bottom - pRect->top, pAlloc->SurfDesc.format);
     
    291291            uint32_t pitch = RT_MIN(srcPitch, dstPitch);
    292292            uint32_t cbCopyLine = vboxWddmCalcRowSize(pRect->left, pRect->right, pAlloc->SurfDesc.format);
    293             Assert(pitch);
     293            Assert(pitch); NOREF(pitch);
    294294            uint32_t cRows = vboxWddmCalcNumRows(pRect->top, pRect->bottom, pAlloc->SurfDesc.format);
    295295            for (UINT j = 0; j < cRows; ++j)
     
    431431    {
    432432        PVBOXWDDMDISP_ALLOCATION pAllocation = &pRc->aAllocations[0];
    433         IDirect3DBaseTexture9 *pD3DIfTex;
     433        IDirect3DBaseTexture9 *pD3DIfTex = NULL; /* Shut up MSC. */
    434434        HANDLE hSharedHandle = pAllocation->hSharedHandle;
    435435        void **pavClientMem = NULL;
     
    570570            PVBOXWDDMDISP_ALLOCATION pAllocation = &pRc->aAllocations[i];
    571571            HANDLE hSharedHandle = pAllocation->hSharedHandle;
    572             IDirect3DSurface9* pD3D9Surf;
     572            IDirect3DSurface9 *pD3D9Surf = NULL; /* Shut up MSC. */
    573573            if (
    574574#ifdef VBOX_WITH_CROGL
     
    644644                hr = S_OK;
    645645                continue;
    646 
     646#if 0 /* unreachable */
    647647                /* fail branch */
    648648                pD3D9Surf->Release();
     649#endif
    649650            }
    650651
  • trunk/src/VBox/Additions/WINNT/Graphics/Video/disp/wddm/VBoxD3DIf.h

    r62522 r63018  
    131131
    132132    HRESULT hr = VBoxD3DIfDeviceCreateDummy(pDevice);
    133     Assert(hr == S_OK);
     133    Assert(hr == S_OK); NOREF(hr);
    134134    Assert(pDevice->pDevice9If);
    135135    return pDevice->pDevice9If;
  • trunk/src/VBox/Additions/WINNT/Graphics/Video/disp/wddm/VBoxDispD3DIf.cpp

    r63017 r63018  
    6161    if (!pD3D->hD3DLib)
    6262    {
    63         DWORD winErr = GetLastError(); NOREF(winErr)
     63        DWORD winErr = GetLastError(); NOREF(winErr);
    6464        WARN((__FUNCTION__": LoadLibrary failed, winErr = (%d)", winErr));
    6565        return E_FAIL;
     
    12781278void VBoxDispD3DGlobalClose(PVBOXWDDMDISP_D3D pD3D, PVBOXWDDMDISP_FORMATS pFormats)
    12791279{
     1280    RT_NOREF(pD3D, pFormats);
    12801281    vboxDispD3DGlobalLock();
    12811282    --g_cVBoxDispD3DGlobalOpens;
    12821283    if (!g_cVBoxDispD3DGlobalOpens)
    1283     {
    12841284        vboxDispD3DGlobalDoClose(&g_VBoxDispD3DGlobalD3D);
    1285     }
    12861285    vboxDispD3DGlobalUnlock();
    12871286}
  • trunk/src/VBox/Additions/WINNT/Graphics/Video/disp/wddm/VBoxUhgsmiBase.h

    r63017 r63018  
    101101    else
    102102    {
    103         if (!cbLock)
    104         {
    105             Assert(0);
    106             return VERR_INVALID_PARAMETER;
    107         }
    108         if (offLock + cbLock > pBuf->cbBuffer)
    109         {
    110             Assert(0);
    111             return VERR_INVALID_PARAMETER;
    112         }
     103        AssertReturn(cbLock, VERR_INVALID_PARAMETER);
     104        AssertReturn(offLock + cbLock <= pBuf->cbBuffer, VERR_INVALID_PARAMETER);
    113105
    114106        uint32_t iFirstPage = offLock >> 12;
     
    160152{
    161153    const uint32_t cbDmaCmd = RT_OFFSETOF(VBOXWDDM_DMA_PRIVATEDATA_UM_CHROMIUM_CMD, aBufInfos[cBuffers]);
    162     if (*pCommandBufferSize < cbDmaCmd)
    163     {
    164         Assert(0);
    165         return VERR_GENERAL_FAILURE;
    166     }
    167     if (AllocationListSize < cBuffers)
    168     {
    169         Assert(0);
    170         return VERR_GENERAL_FAILURE;
    171     }
     154    RT_NOREF(pPatchLocationList, PatchLocationListSize);
     155
     156    AssertReturn(*pCommandBufferSize >= cbDmaCmd, VERR_GENERAL_FAILURE);
     157    AssertReturn(AllocationListSize >= cBuffers, VERR_GENERAL_FAILURE);
    172158
    173159    *pCommandBufferSize = cbDmaCmd;
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