VirtualBox

Changeset 78263 in vbox


Ignore:
Timestamp:
Apr 23, 2019 6:41:06 PM (5 years ago)
Author:
vboxsync
Message:

Config.kmk,GuestHost\OpenGL,HostServices\SharedOpenGL: Fix a bunch of compiler warnings and enable them again

Location:
trunk
Files:
36 edited

Legend:

Unmodified
Added
Removed
  • trunk/Config.kmk

    r78190 r78263  
    73497349 TEMPLATE_VBOXCROGLR3HOSTDLL_OBJCFLAGS       = $(TEMPLATE_VBOXR3NP_OBJCFLAGS) -Wno-deprecated-declarations
    73507350else ifeq ($(KBUILD_TARGET),win)
    7351  #   -wd4255: cr_spu.h(146) : warning C4255: 'wglGetCurrentContextFunc_t' : no function prototype given: converting '()' to '(void)'
    7352  #   -wd4296: udptcpip.c(662) : warning C4296: '>=' : expression is always true
    7353  #   -wd4245: udptcpip.c(174) : warning C4245: '=' : conversion from 'int' to 'CRSocket', signed/unsigned mismatch
    7354  #   -wd4668: tcpip.c(961) : warning C4668: 'CRAPPFAKER_SHOULD_DIE' is not defined as a preprocessor macro, replacing with '0' for '#if/#elif'
    7355  #   -wd4005: v7.1\include\sal_supp.h(57) : warning C4005: '__useHeader' : macro redefinition
    7356  #   -wd4057: state_lists.c(196) : warning C4057: 'function' : 'GLint *' differs in indirection to slightly different base types from 'GLenum *'
    7357  #   -wd4389: renderspu.c(750) : warning C4389: '!=' : signed/unsigned mismatch
    73587351 #   -wd4054: renderspu_wgl.c(281) : warning C4054: 'type cast' : from function pointer 'HWND (__cdecl *)()' to data pointer 'void *'
    73597352 #   -wd4055: renderspu.c(1553) : warning C4055: 'type cast' : from data pointer 'const GLvoid *' to function pointer 'PFNVCRSERVER_CLIENT_CALLOUT'
    7360  #   -wd4312: renderspu_wgl.c(1420) : warning C4312: 'type cast' : conversion from 'GLint' to 'HDC' of greater size [TODO: check this one out]
    7361  #   -wd4305: renderspu_wgl.c(1118) : warning C4305: 'type cast' : truncation from 'uint64_t' to 'void *' [TODO: check this one out]
    7362  #   -wd4306: renderspu_wgl.c(1420) : warning C4306: 'type cast' : conversion from 'GLint' to 'HDC' of greater size [TODO: check this one out]
    7363  #   -wd4189: server_config.c(111) : warning C4189: 'my_rank' : local variable is initialized but not referenced
    7364  #   -wd4100: vboxhgcm.c(1365) : warning C4100: 'conn' : unreferenced formal parameter
    73657353 TEMPLATE_VBOXCROGLR3HOSTDLL_CFLAGS          = $(TEMPLATE_$(TEMPLATE_VBOXCROGLR3HOSTDLL_EXTENDS)_CFLAGS) \
    7366         -wd4255 -wd4296 -wd4245 -wd4668 -wd4005 -wd4057 -wd4389 -wd4054 -wd4055 -wd4312 -wd4305 -wd4306 -wd4189 -wd4100
    7367  TEMPLATE_VBOXCROGLR3HOSTDLL_CXXFLAGS        = $(TEMPLATE_$(TEMPLATE_VBOXCROGLR3HOSTDLL_EXTENDS)_CXXFLAGS) \
    7368         -wd4245 -wd4389 -wd4189 -wd4100
     7354  -wd4055
    73697355endif
    73707356
  • trunk/src/VBox/GuestHost/OpenGL/include/cr_spu.h

    r78190 r78263  
    114114typedef int (WGL_APIENTRY *wglDescribePixelFormatFunc_t)(HDC, int, UINT, CONST PIXELFORMATDESCRIPTOR *);
    115115typedef int (WGL_APIENTRY *wglSetPixelFormatFunc_t)(HDC, int, CONST PIXELFORMATDESCRIPTOR *);
    116 typedef HGLRC (WGL_APIENTRY *wglGetCurrentContextFunc_t)();
    117 typedef PROC (WGL_APIENTRY *wglGetProcAddressFunc_t)();
     116typedef HGLRC (WGL_APIENTRY *wglGetCurrentContextFunc_t)(void);
     117typedef PROC (WGL_APIENTRY *wglGetProcAddressFunc_t)(LPCSTR Arg1);
    118118typedef BOOL (WGL_APIENTRY *wglChoosePixelFormatEXTFunc_t)(HDC, const int *, const FLOAT *, UINT, int *, UINT *);
    119119typedef BOOL (WGL_APIENTRY *wglGetPixelFormatAttribivEXTFunc_t)(HDC, int, int, UINT, int *, int *);
    120120typedef BOOL (WGL_APIENTRY *wglGetPixelFormatAttribfvEXTFunc_t)(HDC, int, int, UINT, int *, float *);
    121121typedef const GLubyte *(WGL_APIENTRY *glGetStringFunc_t)( GLenum );
    122 typedef const GLubyte *(WGL_APIENTRY *wglGetExtensionsStringEXTFunc_t)();
     122typedef const GLubyte *(WGL_APIENTRY *wglGetExtensionsStringEXTFunc_t)(void);
    123123typedef const GLubyte *(WGL_APIENTRY *wglGetExtensionsStringARBFunc_t)(HDC);
    124124/*@}*/
  • trunk/src/VBox/GuestHost/OpenGL/include/cr_unpack.h

    r78198 r78263  
    9494        return; \
    9595    } \
    96     size_t int_cbAccessVerified = (a_cbAccess)
     96    size_t int_cbAccessVerified = (a_cbAccess); RT_NOREF(int_cbAccessVerified)
    9797
    9898#define CHECK_BUFFER_SIZE_STATIC_LAST(a_pState, a_offAccessLast, a_Type) CHECK_BUFFER_SIZE_STATIC(a_pState, (a_offAccessLast) + sizeof( a_Type ))
  • trunk/src/VBox/GuestHost/OpenGL/spu_loader/choosevisual.c

    r69392 r78263  
    2121{
    2222        /* placeholder */
     23        RT_NOREF(ws, visBits);
    2324        return 0;
    2425}
  • trunk/src/VBox/GuestHost/OpenGL/state_tracker/state_client.c

    r78116 r78263  
    10851085    unsigned char *base = (unsigned char *) p;
    10861086
     1087#ifndef IN_GUEST
     1088    RT_NOREF(fRealPtr);
     1089#endif
     1090
    10871091    if (g->current.inBeginEnd)
    10881092    {
     
    15791583}
    15801584
    1581 void STATE_APIENTRY crStateUnlockArraysEXT()
     1585void STATE_APIENTRY crStateUnlockArraysEXT(void)
    15821586{
    15831587    CRContext *g = GetCurrentContext();
     
    17281732            else
    17291733            {
    1730                 zvMax = ~0;
     1734                zvMax = ~UINT32_C(0);
    17311735                break;
    17321736            }
  • trunk/src/VBox/GuestHost/OpenGL/state_tracker/state_glsl.c

    r78190 r78263  
    12811281    return result;
    12821282#else
     1283    RT_NOREF(program, name);
    12831284    crWarning("crStateGetUniformLocation called on host side!!");
    12841285    return -1;
     
    13161317    return result;
    13171318#else
     1319    RT_NOREF(program, name);
    13181320    crWarning("crStateGetAttribLocation called on host side!!");
    13191321    return -1;
  • trunk/src/VBox/GuestHost/OpenGL/state_tracker/state_init.c

    r69392 r78263  
    787787}
    788788
    789 void crStateCleanupCurrent()
     789void crStateCleanupCurrent(void)
    790790{
    791791    crStateSetCurrentEx( NULL, GL_TRUE );
  • trunk/src/VBox/GuestHost/OpenGL/state_tracker/state_lists.c

    r69392 r78263  
    5959#define CRSTATE_SET_ENABLED(state, cap) CRSTATE_SET_CAP(state, diff_api.IsEnabled(cap), "%u")
    6060
    61 #define CRSTATE_SET_ENUM(state, cap) {GLenum _e=g->state; diff_api.GetIntegerv(cap, &_e); CRSTATE_SET_CAP(state, _e, "%#x");}
     61#define CRSTATE_SET_ENUM(state, cap) {GLenum _e=g->state; diff_api.GetIntegerv(cap, (GLint *)&_e); CRSTATE_SET_CAP(state, _e, "%#x");}
    6262#define CRSTATE_SET_FLOAT(state, cap) {GLfloat _f=g->state; diff_api.GetFloatv(cap, &_f); CRSTATE_SET_CAP(state, _f, "%f");}
    6363#define CRSTATE_SET_INT(state, cap) {GLint _i=g->state; diff_api.GetIntegerv(cap, &_i); CRSTATE_SET_CAP(state, _i, "%i");}
     
    224224        {
    225225            GLuint buf = 0;
    226             diff_api.GetIntegerv(GL_DRAW_BUFFER, &buf);
     226            diff_api.GetIntegerv(GL_DRAW_BUFFER, (GLint *)&buf);
    227227
    228228            if (buf == GL_COLOR_ATTACHMENT0_EXT && (bbFbo || fbFbo))
    229229            {
    230230                GLuint binding = 0;
    231                 diff_api.GetIntegerv(GL_DRAW_FRAMEBUFFER_BINDING, &binding);
     231                diff_api.GetIntegerv(GL_DRAW_FRAMEBUFFER_BINDING, (GLint *)&binding);
    232232                if (!binding)
    233233                {
     
    257257        {
    258258            GLuint buf = 0;
    259             diff_api.GetIntegerv(GL_READ_BUFFER, &buf);
     259            diff_api.GetIntegerv(GL_READ_BUFFER, (GLint *)&buf);
    260260
    261261            if (buf == GL_COLOR_ATTACHMENT0_EXT && (bbFbo || fbFbo))
    262262            {
    263263                GLuint binding = 0;
    264                 diff_api.GetIntegerv(GL_READ_FRAMEBUFFER_BINDING, &binding);
     264                diff_api.GetIntegerv(GL_READ_FRAMEBUFFER_BINDING, (GLint *)&binding);
    265265                if (!binding)
    266266                {
  • trunk/src/VBox/GuestHost/OpenGL/state_tracker/state_snapshot.c

    r78117 r78263  
    11061106    int32_t rc;
    11071107
     1108    RT_NOREF(data1);
     1109
    11081110    rc = SSMR3PutMem(pSSM, &key, sizeof(key));
    11091111    CRASSERT(rc == VINF_SUCCESS);
     
    18091811#include "state_bits_globalop.h"
    18101812#undef CRSTATE_BITS_OP
     1813#else
     1814    RT_NOREF(pSSM);
    18111815#endif
    18121816    return VINF_SUCCESS;
  • trunk/src/VBox/GuestHost/OpenGL/state_tracker/state_transform.c

    r69392 r78263  
    343343}
    344344
    345 void STATE_APIENTRY crStateLoadIdentity()
     345void STATE_APIENTRY crStateLoadIdentity(void)
    346346{
    347347    CRContext *g = GetCurrentContext();
     
    366366}
    367367
    368 void STATE_APIENTRY crStatePopMatrix()
     368void STATE_APIENTRY crStatePopMatrix(void)
    369369{
    370370    CRContext *g = GetCurrentContext();
     
    398398}
    399399
    400 void STATE_APIENTRY crStatePushMatrix()
     400void STATE_APIENTRY crStatePushMatrix(void)
    401401{
    402402    CRContext *g = GetCurrentContext();
  • trunk/src/VBox/GuestHost/OpenGL/util/vboxhgcm.c

    r78190 r78263  
    13541354
    13551355#else  /* !IN_GUEST */
     1356    RT_NOREF(conn);
    13561357    crError("crVBoxHGCMDoConnect called on host side!");
    13571358    CRASSERT(FALSE);
  • trunk/src/VBox/HostServices/SharedOpenGL/crserver/crservice.cpp

    r76787 r78263  
    15751575BOOL WINAPI DllMain(HINSTANCE hDLLInst, DWORD fdwReason, LPVOID lpvReserved)
    15761576{
     1577    RT_NOREF(hDLLInst);
    15771578    (void) lpvReserved;
    15781579
  • trunk/src/VBox/HostServices/SharedOpenGL/crserverlib/presenter/display_base.cpp

    r76553 r78263  
    130130int CrFbDisplayBase::UpdateBegin(struct CR_FRAMEBUFFER *pFb)
    131131{
     132    RT_NOREF(pFb);
     133
    132134    ++mcUpdates;
    133135    Assert(!mFlags.fRegionsShanged || mcUpdates > 1);
     
    138140void CrFbDisplayBase::UpdateEnd(struct CR_FRAMEBUFFER *pFb)
    139141{
     142    RT_NOREF(pFb);
     143
    140144    --mcUpdates;
    141145    Assert(mcUpdates < UINT32_MAX/2);
     
    147151int CrFbDisplayBase::EntryCreated(struct CR_FRAMEBUFFER *pFb, HCR_FRAMEBUFFER_ENTRY hEntry)
    148152{
     153    RT_NOREF(pFb, hEntry);
     154
    149155    if (!mcUpdates)
    150156    {
     
    158164int CrFbDisplayBase::EntryAdded(struct CR_FRAMEBUFFER *pFb, HCR_FRAMEBUFFER_ENTRY hEntry)
    159165{
     166    RT_NOREF(pFb, hEntry);
     167
    160168    if (!mcUpdates)
    161169    {
     
    171179    HCR_FRAMEBUFFER_ENTRY hReplacedEntry)
    172180{
     181    RT_NOREF(pFb, hNewEntry, hReplacedEntry);
     182
    173183    if (!mcUpdates)
    174184    {
     
    182192int CrFbDisplayBase::EntryTexChanged(struct CR_FRAMEBUFFER *pFb, HCR_FRAMEBUFFER_ENTRY hEntry)
    183193{
     194    RT_NOREF(pFb, hEntry);
     195
    184196    if (!mcUpdates)
    185197    {
     
    193205int CrFbDisplayBase::EntryRemoved(struct CR_FRAMEBUFFER *pFb, HCR_FRAMEBUFFER_ENTRY hEntry)
    194206{
     207    RT_NOREF(pFb, hEntry);
     208
    195209    if (!mcUpdates)
    196210    {
     
    205219int CrFbDisplayBase::EntryDestroyed(struct CR_FRAMEBUFFER *pFb, HCR_FRAMEBUFFER_ENTRY hEntry)
    206220{
     221    RT_NOREF(pFb, hEntry);
    207222    return VINF_SUCCESS;
    208223}
     
    211226int CrFbDisplayBase::EntryPosChanged(struct CR_FRAMEBUFFER *pFb, HCR_FRAMEBUFFER_ENTRY hEntry)
    212227{
     228    RT_NOREF(pFb, hEntry);
     229
    213230    if (!mcUpdates)
    214231    {
     
    223240int CrFbDisplayBase::RegionsChanged(struct CR_FRAMEBUFFER *pFb)
    224241{
     242    RT_NOREF(pFb);
     243
    225244    if (!mcUpdates)
    226245    {
     
    235254int CrFbDisplayBase::FramebufferChanged(struct CR_FRAMEBUFFER *pFb)
    236255{
     256    RT_NOREF(pFb);
     257
    237258    if (!mcUpdates)
    238259    {
     
    349370DECLCALLBACK(void) CrFbDisplayBase::slotEntryReleaseCB(HCR_FRAMEBUFFER hFb, HCR_FRAMEBUFFER_ENTRY hEntry, void *pvContext)
    350371{
     372    RT_NOREF(hFb, hEntry, pvContext);
    351373}
    352374
  • trunk/src/VBox/HostServices/SharedOpenGL/crserverlib/presenter/display_window.cpp

    r76553 r78263  
    2222    mpWindow(NULL),
    2323    mViewportRect(*pViewportRect),
    24     mu32Screen(~0),
     24    mu32Screen(~UINT32_C(0)),
    2525    mParentId(parentId)
    2626{
     
    232232    }
    233233
    234     CrFbWindow * pOld = mpWindow;
    235234    if (mpWindow)
    236235        windowDetach();
     
    324323    CrFbDisplayBase::onUpdateEnd();
    325324    bool fVisible = isVisible();
    326     if (mFlags.fNeVisible != fVisible || mFlags.fNeForce)
     325    if (RT_BOOL(mFlags.fNeVisible) != fVisible || mFlags.fNeForce)
    327326    {
    328327        crVBoxServerNotifyEvent(mu32Screen,
  • trunk/src/VBox/HostServices/SharedOpenGL/crserverlib/presenter/display_window_rootvr.cpp

    r76553 r78263  
    136136    }
    137137
    138     const VBOXVR_SCR_COMPOSITOR_ENTRY* pSrcEntry = CrFbEntryGetCompositorEntry(hEntry);
    139138    VBOXVR_SCR_COMPOSITOR_ENTRY *pMyEntry = (VBOXVR_SCR_COMPOSITOR_ENTRY*)CrFbDDataEntryGet(hEntry, slotGet());
    140139    CrVrScrCompositorEntryCleanup(pMyEntry);
     
    322321void CrFbDisplayWindowRootVr::rootVrTranslateForPos()
    323322{
    324     const RTRECT *pRect = getViewportRect();
    325323    const struct VBVAINFOSCREEN* pScreen = CrFbGetScreenInfo(getFramebuffer());
    326324    int32_t x = pScreen->i32OriginX;
  • trunk/src/VBox/HostServices/SharedOpenGL/crserverlib/presenter/server_presenter.cpp

    r78106 r78263  
    222222    int32_t dstHeight = pDstRect->yBottom - pDstRect->yTop;
    223223
    224     RTPOINT DstPoint = {pDstRect->xLeft, pDstRect->yTop};
    225224    float strX = ((float)dstWidth) / srcWidth;
    226225    float strY = ((float)dstHeight) / srcHeight;
     
    472471
    473472    return rc;
     473#else
     474    RT_NOREF(hFb, pSrcRectSize, pDstRect, cRects, pRects, pImg);
    474475#endif
    475476}
     
    682683static void crFbBltPutContentsFbVram(HCR_FRAMEBUFFER hFb, const RTPOINT *pPos, uint32_t cRects, const RTRECT *pRects, CR_BLITTER_IMG *pSrc)
    683684{
    684     const RTRECT *pCompRect = CrVrScrCompositorRectGet(&hFb->Compositor);
    685 
    686685    CR_BLITTER_IMG FbImg;
    687686
     
    758757    }
    759758
    760     bool fRegChanged = false;
    761759    for (uint32_t i = 0; i < cCompRects; ++i)
    762760    {
     
    12681266void CrFbEntryAddRef(CR_FRAMEBUFFER *pFb, HCR_FRAMEBUFFER_ENTRY hEntry)
    12691267{
     1268    RT_NOREF(pFb);
    12701269    ++hEntry->cRefs;
    12711270}
     
    14331432    }
    14341433
    1435     bool fChanged = 0;
    1436     VBOXVR_SCR_COMPOSITOR_ENTRY *pReplacedScrEntry = NULL;
     1434    bool fChanged = false;
    14371435    VBOXVR_SCR_COMPOSITOR_ENTRY *pNewEntry;
    14381436    bool fEntryWasInList;
     
    18681866        }
    18691867    }
     1868#else
     1869    RT_NOREF(idScreen);
    18701870#endif
    18711871    return VINF_SUCCESS;
     
    20812081    CR_FB_INFO *pFbInfo = &g_CrPresenter.aFbInfos[idFb];
    20822082    CR_FBDISPLAY_INFO *pDpInfo = &g_CrPresenter.aDisplayInfos[i];
    2083     if (pDpInfo->iFb != idFb)
     2083    if (pDpInfo->iFb != (int32_t)idFb)
    20842084    {
    20852085        WARN(("target not connected"));
     
    23042304    CR_FB_INFO *pFbInfo = &g_CrPresenter.aFbInfos[idFb];
    23052305    CR_FBDISPLAY_INFO *pDpInfo = &g_CrPresenter.aDisplayInfos[i];
    2306     if (pDpInfo->iFb == idFb)
     2306    if (pDpInfo->iFb == (int32_t)idFb)
    23072307    {
    23082308        WARN(("target not connected"));
     
    29092909        if (hFb)
    29102910        {
    2911             Assert(hFb->ScreenInfo.u32ViewIndex == i);
     2911            Assert(hFb->ScreenInfo.u32ViewIndex == (uint32_t)i);
    29122912            rc = SSMR3PutU32(pSSM, hFb->ScreenInfo.u32ViewIndex);
    29132913            AssertRCReturn(rc, rc);
     
    29542954int CrFbEntryLoadState(CR_FRAMEBUFFER *pFb, PSSMHANDLE pSSM, uint32_t version)
    29552955{
     2956    RT_NOREF(version);
     2957
    29562958    uint32_t texture;
    29572959    int  rc = SSMR3GetU32(pSSM, &texture);
     
    29732975
    29742976    Assert(hEntry);
    2975 
    2976     const struct VBOXVR_SCR_COMPOSITOR_ENTRY *pEntry = CrFbEntryGetCompositorEntry(hEntry);
    2977     CR_TEXDATA *pTexData = CrVrScrCompositorEntryTexGet(pEntry);
    2978     CR_FBTEX *pFbTex = PCR_FBTEX_FROM_TEX(pTexData);
    29792977
    29802978    RTPOINT Point;
  • trunk/src/VBox/HostServices/SharedOpenGL/crserverlib/server.h

    r78190 r78263  
    118118GLint crServerMuralInit(CRMuralInfo *mural, GLboolean fGuestWindow, GLint visBits, GLint preloadWinID);
    119119void crServerMuralTerm(CRMuralInfo *mural);
    120 GLboolean crServerMuralSize(CRMuralInfo *mural, GLint width, GLint height);
     120GLboolean crServerMuralSize(CRMuralInfo *mural, GLuint width, GLuint height);
    121121void crServerMuralPosition(CRMuralInfo *mural, GLint x, GLint y);
    122122void crServerMuralVisibleRegion( CRMuralInfo *mural, GLint cRects, const GLint *pRects );
  • trunk/src/VBox/HostServices/SharedOpenGL/crserverlib/server_boundsinfo.cpp

    r78190 r78263  
    2424                                                                                                                        GLint len, GLint num_opcodes )
    2525{
    26 
     26    RT_NOREF(bounds, payload, len, num_opcodes);
    2727}
  • trunk/src/VBox/HostServices/SharedOpenGL/crserverlib/server_bufferobject.cpp

    r78190 r78263  
    1515crServerDispatchMapBufferARB( GLenum target, GLenum access )
    1616{
     17    RT_NOREF(target, access);
    1718        return NULL;
    1819}
     
    2122crServerDispatchUnmapBufferARB( GLenum target )
    2223{
     24    RT_NOREF(target);
    2325        return GL_FALSE;
    2426}
     
    7577    void *b;
    7678
     79    RT_NOREF(data);
     80
    7781    if (size <= 0 || size >= INT32_MAX / 2)
    7882    {
  • trunk/src/VBox/HostServices/SharedOpenGL/crserverlib/server_clear.cpp

    r78190 r78263  
    162162void SERVER_DISPATCH_APIENTRY crServerDispatchClear( GLenum mask )
    163163{
    164         CRMuralInfo *mural = cr_server.curClient->currentMural;
    165         const RunQueue *q = cr_server.run_queue;
    166 
    167164        if (cr_server.only_swap_once)
    168165        {
  • trunk/src/VBox/HostServices/SharedOpenGL/crserverlib/server_context.cpp

    r78190 r78263  
    181181    CRContext *ctx = (CRContext *) data2;
    182182
     183    RT_NOREF(key);
    183184    CR_STATE_SHAREDOBJ_USAGE_CLEAR(mural, ctx);
    184185}
     
    390391    if (mural && mural->fRedirected  && crServerSupportRedirMuralFBO())
    391392    {
    392         GLuint id = crServerMuralFBOIdxFromBufferName(mural, ctx->buffer.drawBuffer);
     393        GLint id = crServerMuralFBOIdxFromBufferName(mural, ctx->buffer.drawBuffer);
    393394        if (id != mural->iCurDrawBuffer)
    394395        {
     
    437438    CRMuralInfo *mural;
    438439    CRContextInfo *ctxInfo = NULL;
     440
     441    RT_NOREF(nativeWindow);
    439442
    440443    if (context >= 0 && window >= 0) {
  • trunk/src/VBox/HostServices/SharedOpenGL/crserverlib/server_getpointer.cpp

    r78190 r78263  
    2020{
    2121        crError( "glGetVertexAttribPointervNV isn't *ever* allowed to be on the wire!" );
    22         (void) pname;
    23         (void) pointer;
     22        RT_NOREF(index, pname, pointer);
    2423}
    2524
     
    2726{
    2827        crError( "glGetVertexAttribPointervNV isn't *ever* allowed to be on the wire!" );
    29         (void) pname;
    30         (void) pointer;
     28        RT_NOREF(index, pname, pointer);
    3129}
    3230
  • trunk/src/VBox/HostServices/SharedOpenGL/crserverlib/server_getshaders.cpp

    r78190 r78263  
    3737void SERVER_DISPATCH_APIENTRY crServerDispatchGetActiveAttrib(GLuint program, GLuint index, GLsizei bufSize, GLsizei *length, GLint *size, GLenum *type, char *name)
    3838{
     39    RT_NOREF(name, type, size, length);
     40
    3941    crGetActive_t *pLocal = NULL;
    4042
     
    5759void SERVER_DISPATCH_APIENTRY crServerDispatchGetActiveUniform(GLuint program, GLuint index, GLsizei bufSize, GLsizei *length, GLint *size, GLenum *type, char *name)
    5860{
     61    RT_NOREF(name, type, size, length);
     62
    5963    crGetActive_t *pLocal = NULL;
    6064
     
    7781void SERVER_DISPATCH_APIENTRY crServerDispatchGetAttachedShaders(GLuint program, GLsizei maxCount, GLsizei *count, GLuint *shaders)
    7882{
     83    RT_NOREF(count, shaders);
     84
    7985    GLsizei *pLocal = NULL;
    8086
     
    106112void SERVER_DISPATCH_APIENTRY crServerDispatchGetAttachedObjectsARB(VBoxGLhandleARB containerObj, GLsizei maxCount, GLsizei * count, VBoxGLhandleARB * obj)
    107113{
     114    RT_NOREF(count, obj);
     115
    108116    GLsizei *pLocal = NULL;
    109117
     
    137145void SERVER_DISPATCH_APIENTRY crServerDispatchGetInfoLogARB(VBoxGLhandleARB obj, GLsizei maxLength, GLsizei * length, GLcharARB * infoLog)
    138146{
     147    RT_NOREF(length, infoLog);
     148
    139149    GLsizei *pLocal = NULL;
    140150    GLuint hwid;
     
    162172void SERVER_DISPATCH_APIENTRY crServerDispatchGetShaderInfoLog(GLuint shader, GLsizei bufSize, GLsizei *length, char *infoLog)
    163173{
     174    RT_NOREF(length, infoLog);
     175
    164176    GLsizei *pLocal = NULL;
    165177
     
    182194void SERVER_DISPATCH_APIENTRY crServerDispatchGetProgramInfoLog(GLuint program, GLsizei bufSize, GLsizei *length, char *infoLog)
    183195{
     196    RT_NOREF(length, infoLog);
     197
    184198    GLsizei *pLocal = NULL;
    185199
     
    203217void SERVER_DISPATCH_APIENTRY crServerDispatchGetShaderSource(GLuint shader, GLsizei bufSize, GLsizei *length, char *source)
    204218{
     219    RT_NOREF(length, source);
     220
    205221    GLsizei *pLocal = NULL;
    206222
     
    287303void SERVER_DISPATCH_APIENTRY crServerDispatchGetUniformfv(GLuint program, GLint location, GLfloat *params)
    288304{
     305    RT_NOREF(params);
     306
    289307    int size = __GetUniformSize(program, location) * sizeof(GLfloat);
    290308    GLfloat *pLocal;
     
    306324void SERVER_DISPATCH_APIENTRY crServerDispatchGetUniformiv(GLuint program, GLint location, GLint *params)
    307325{
     326    RT_NOREF(params);
     327
    308328    int size = __GetUniformSize(program, location) * sizeof(GLint);
    309329    GLint *pLocal;
  • trunk/src/VBox/HostServices/SharedOpenGL/crserverlib/server_main.cpp

    r78191 r78263  
    647647extern DECLEXPORT(int32_t) crVBoxServerClientGetCapsLegacy(uint32_t u32ClientID, uint32_t *pu32Caps)
    648648{
     649    RT_NOREF(u32ClientID);
     650
    649651    uint32_t u32Caps = cr_server.u32Caps;
    650652    u32Caps &= ~CR_VBOX_CAP_CMDVBVA;
     
    655657extern DECLEXPORT(int32_t) crVBoxServerClientGetCapsNew(uint32_t u32ClientID, CR_CAPS_INFO *pInfo)
    656658{
     659    RT_NOREF(u32ClientID);
     660
    657661    pInfo->u32Caps = cr_server.u32Caps;
    658662    pInfo->u32CmdVbvaVersion = CR_CMDVBVA_VERSION;
     
    790794static void crVBoxServerSyncTextureCB(unsigned long key, void *data1, void *data2)
    791795{
     796    RT_NOREF(key);
     797
    792798    CRTextureObj *pTexture = (CRTextureObj *) data1;
    793799    CRContext *pContext = (CRContext *) data2;
     
    892898static void crVBoxServerBuildContextUsedWindowMapCB(unsigned long key, void *data1, void *data2)
    893899{
     900    RT_NOREF(key);
     901
    894902    CRContextInfo *pContextInfo = (CRContextInfo *)data1;
    895903    PCRVBOX_CTXWND_CTXWALKER_CB pData = (PCRVBOX_CTXWND_CTXWALKER_CB)data2;
     
    930938static void crVBoxServerBuildContextUnusedWindowMapCB(unsigned long key, void *data1, void *data2)
    931939{
     940    RT_NOREF(key);
     941
    932942    CRContextInfo *pContextInfo = (CRContextInfo *)data1;
    933943    PCRVBOX_CTXWND_CTXWALKER_CB pData = (PCRVBOX_CTXWND_CTXWALKER_CB)data2;
     
    21982208            CRClient *pClient = cr_server.clients[i];
    21992209            CRClient client;
    2200             unsigned long ctxID=-1, winID=-1;
     2210            unsigned long ctxID = (unsigned long)-1, winID = (unsigned long)-1;
    22012211
    22022212            rc = crServerLsrDataGetU32(&Reader, &ui);
     
    23312341static void crVBoxServerReparentMuralCB(unsigned long key, void *data1, void *data2)
    23322342{
     2343    RT_NOREF(key);
     2344
    23332345    CRMuralInfo *pMI = (CRMuralInfo*) data1;
    23342346    int *sIndex = (int*) data2;
     
    27062718            if (cParams == 1)
    27072719            {
    2708                 CRVBOXHGSMIWRITE* pFnCmd = (CRVBOXHGSMIWRITE*)pHdr;
    27092720                const VBOXCMDVBVA_CRCMD_BUFFER *pBuf = &pCmd->aBuffers[1];
    27102721                /* Fetch parameters. */
     
    27122723                uint8_t *pBuffer  = VBOXCRHGSMI_PTR_SAFE(pBuf->offBuffer, cbBuffer, uint8_t);
    27132724
    2714                 if (cbHdr < sizeof (*pFnCmd))
     2725                if (cbHdr < sizeof (CRVBOXHGSMIWRITE))
    27152726                {
    27162727                    WARN(("invalid write cmd buffer size!"));
     
    29572968static DECLCALLBACK(int) crVBoxCrCmdEnable(HVBOXCRCMDSVR hSvr, VBOXCRCMD_SVRENABLE_INFO *pInfo)
    29582969{
     2970    RT_NOREF(hSvr);
    29592971    Assert(!cr_server.fCrCmdEnabled);
    29602972    Assert(!cr_server.numClients);
     
    29732985static DECLCALLBACK(int) crVBoxCrCmdDisable(HVBOXCRCMDSVR hSvr)
    29742986{
     2987    RT_NOREF(hSvr);
    29752988    Assert(cr_server.fCrCmdEnabled);
    29762989
     
    29923005static DECLCALLBACK(int) crVBoxCrCmdHostCtl(HVBOXCRCMDSVR hSvr, uint8_t* pCmd, uint32_t cbCmd)
    29933006{
     3007    RT_NOREF(hSvr);
    29943008    return crVBoxServerHostCtl((VBOXCRCMDCTL*)pCmd, cbCmd);
    29953009}
     
    30753089     * Toplevel input validation.
    30763090     */
     3091    RT_NOREF(hSvr);
    30773092    ASSERT_GUEST_LOGREL_RETURN(cbCmd >= sizeof(VBOXCMDVBVA_3DCTL), VERR_INVALID_PARAMETER);
    30783093    {
     
    31203135static DECLCALLBACK(int) crVBoxCrCmdResize(HVBOXCRCMDSVR hSvr, const struct VBVAINFOSCREEN *pScreen, const uint32_t *pTargetMap)
    31213136{
     3137    RT_NOREF(hSvr);
    31223138    CRASSERT(cr_server.fCrCmdEnabled);
    31233139    return CrPMgrResize(pScreen, NULL, pTargetMap);
     
    31523168static int crVBoxCrCmdLoadClients(PSSMHANDLE pSSM, uint32_t u32Version)
    31533169{
     3170    RT_NOREF(u32Version);
     3171
    31543172    uint32_t i;
    31553173    uint32_t u32;
     
    31823200static DECLCALLBACK(int) crVBoxCrCmdSaveState(HVBOXCRCMDSVR hSvr, PSSMHANDLE pSSM)
    31833201{
     3202    RT_NOREF(hSvr);
     3203
    31843204    int rc = VINF_SUCCESS;
    31853205
     
    32333253static DECLCALLBACK(int) crVBoxCrCmdLoadState(HVBOXCRCMDSVR hSvr, PSSMHANDLE pSSM, uint32_t u32Version)
    32343254{
     3255    RT_NOREF(hSvr);
     3256
    32353257    int rc = VINF_SUCCESS;
    32363258
     
    32983320                                           const VBOXCMDVBVA_HDR RT_UNTRUSTED_VOLATILE_GUEST *pCmd, uint32_t cbCmd)
    32993321{
     3322    RT_NOREF(hSvr);
     3323
    33003324    uint8_t bOpcode = pCmd->u8OpCode;
    33013325    RT_UNTRUSTED_NONVOLATILE_COPY_FENCE();
     
    33593383int32_t crVBoxServerCrHgsmiCmd(struct VBOXVDMACMD_CHROMIUM_CMD *pCmd, uint32_t cbCmd)
    33603384{
     3385    RT_NOREF(cbCmd);
    33613386
    33623387    int32_t rc;
     
    34173442            if (cParams == 1)
    34183443            {
    3419                 CRVBOXHGSMIWRITE* pFnCmd = (CRVBOXHGSMIWRITE*)pHdr;
    34203444                VBOXVDMACMD_CHROMIUM_BUFFER *pBuf = &pCmd->aBuffers[1];
    34213445                /* Fetch parameters. */
     
    34233447                uint8_t *pBuffer  = VBOXCRHGSMI_PTR_SAFE(pBuf->offBuffer, cbBuffer, uint8_t);
    34243448
    3425                 if (cbHdr < sizeof (*pFnCmd))
     3449                if (cbHdr < sizeof (CRVBOXHGSMIWRITE))
    34263450                {
    34273451                    crWarning("invalid write cmd buffer size!");
     
    36963720int32_t crVBoxServerCrHgsmiCtl(struct VBOXVDMACMD_CHROMIUM_CTL *pCtl, uint32_t cbCtl)
    36973721{
     3722    RT_NOREF(cbCtl);
     3723
    36983724    int rc = VINF_SUCCESS;
    36993725
  • trunk/src/VBox/HostServices/SharedOpenGL/crserverlib/server_misc.cpp

    r78190 r78263  
    2424void SERVER_DISPATCH_APIENTRY crServerDispatchGetChromiumParametervCR(GLenum target, GLuint index, GLenum type, GLsizei count, GLvoid *values)
    2525{
     26    RT_NOREF(values);
     27
    2628    GLubyte local_storage[4096];
    2729    GLint bytes = 0;
     
    109111void SERVER_DISPATCH_APIENTRY crServerDispatchChromiumParametervCR(GLenum target, GLenum type, GLsizei count, const GLvoid *values)
    110112{
    111     CRMuralInfo *mural = cr_server.curClient->currentMural;
    112113    static int gather_connect_count = 0;
    113114
     
    19741975            gl->GetProgramivARB(GL_VERTEX_PROGRAM_ARB, GL_PROGRAM_BINDING_ARB, &pid);
    19751976
    1976             if (pid != ctx->program.currentVertexProgram->id)
     1977            if ((GLuint)pid != ctx->program.currentVertexProgram->id)
    19771978            {
    19781979                crWarning("pid(%d) != ctx->program.currentVertexProgram->id(%d)", pid, ctx->program.currentVertexProgram->id);
    19791980            }
    1980             AssertRelease(pid == ctx->program.currentVertexProgram->id);
     1981            AssertRelease((GLuint)pid == ctx->program.currentVertexProgram->id);
    19811982        }
    19821983        else
     
    19851986
    19861987            gl->GetIntegerv(GL_VERTEX_PROGRAM_BINDING_NV, &pid);
    1987             if (pid != ctx->program.currentVertexProgram->id)
     1988            if ((GLuint)pid != ctx->program.currentVertexProgram->id)
    19881989            {
    19891990                crWarning("pid(%d) != ctx->program.currentVertexProgram->id(%d)", pid, ctx->program.currentVertexProgram->id);
    19901991            }
    1991             AssertRelease(pid == ctx->program.currentVertexProgram->id);
     1992            AssertRelease((GLuint)pid == ctx->program.currentVertexProgram->id);
    19921993        }
    19931994    }
     
    19981999        gl->GetIntegerv(GL_CURRENT_PROGRAM, &pid);
    19992000        //crDebug("pid %i, state: id %i, hwid %i", pid, ctx->glsl.activeProgram->id, ctx->glsl.activeProgram->hwid);
    2000         if (pid != ctx->glsl.activeProgram->hwid)
     2001        if ((GLuint)pid != ctx->glsl.activeProgram->hwid)
    20012002        {
    20022003            crWarning("pid(%d) != ctx->glsl.activeProgram->hwid(%d)", pid, ctx->glsl.activeProgram->hwid);
    20032004        }
    2004         AssertRelease(pid == ctx->glsl.activeProgram->hwid);
     2005        AssertRelease((GLuint)pid == ctx->glsl.activeProgram->hwid);
    20052006    }
    20062007#endif
  • trunk/src/VBox/HostServices/SharedOpenGL/crserverlib/server_muralfbo.cpp

    r76553 r78263  
    5151static void crServerCheckMuralGeometryCB(unsigned long key, void *data1, void *data2)
    5252{
     53    RT_NOREF(key);
     54
    5355    CRMuralInfo *pMI = (CRMuralInfo*) data1;
    5456
     
    314316static void crVBoxServerMuralFbCleanCB(unsigned long key, void *data1, void *data2)
    315317{
     318    RT_NOREF(key);
     319
    316320    CRMuralInfo *pMI = (CRMuralInfo*) data1;
    317321    HCR_FRAMEBUFFER hFb = (HCR_FRAMEBUFFER)data2;
     
    330334static void crVBoxServerMuralFbSetCB(unsigned long key, void *data1, void *data2)
    331335{
     336    RT_NOREF(key);
     337
    332338    CRMuralInfo *pMI = (CRMuralInfo*) data1;
    333339    HCR_FRAMEBUFFER hFb = (HCR_FRAMEBUFFER)data2;
     
    657663DECLEXPORT(void) crServerVBoxCompositionSetEnableStateGlobal(GLboolean fEnable)
    658664{
     665    RT_NOREF(fEnable);
    659666}
    660667
     
    819826{
    820827    CRContext *ctx = crStateGetCurrent();
    821     GLuint iOldCurDrawBuffer = mural->iCurDrawBuffer;
    822     GLuint iOldCurReadBuffer = mural->iCurReadBuffer;
     828    GLint iOldCurDrawBuffer = mural->iCurDrawBuffer;
     829    GLint iOldCurReadBuffer = mural->iCurReadBuffer;
    823830    mural->iBbBuffer = ((mural->iBbBuffer + 1) % (mural->cBuffers));
    824831    if (mural->iCurDrawBuffer >= 0)
  • trunk/src/VBox/HostServices/SharedOpenGL/crserverlib/server_projmatrix.cpp

    r78190 r78263  
    4343{
    4444    const GLenum matMode = cr_server.curClient->currentCtxInfo->pContext->transform.matrixMode;
    45     const CRMuralInfo *mural = cr_server.curClient->currentMural;
    4645
    4746    crStateLoadMatrixf( m );
     
    6059{
    6160    const GLenum matMode = cr_server.curClient->currentCtxInfo->pContext->transform.matrixMode;
    62     const CRMuralInfo *mural = cr_server.curClient->currentMural;
    6361
    6462    crStateLoadMatrixd( m );
     
    112110{
    113111    const GLenum matMode = cr_server.curClient->currentCtxInfo->pContext->transform.matrixMode;
    114     const CRMuralInfo *mural = cr_server.curClient->currentMural;
    115112
    116113    crStateLoadIdentity();
  • trunk/src/VBox/HostServices/SharedOpenGL/crserverlib/server_rpw.cpp

    r76553 r78263  
    122122static DECLCALLBACK(int) crServerRpwWorkerThread(RTTHREAD ThreadSelf, void *pvUser)
    123123{
     124    RT_NOREF(ThreadSelf);
     125
    124126    CR_SERVER_RPW *pWorker = (CR_SERVER_RPW *)pvUser;
    125127    RTMSINTERVAL cWaitMillis = RT_INDEFINITE_WAIT;
     
    273275static int crServerRpwCtlNotify(CR_SERVER_RPW *pWorker, CR_SERVER_RPW_ENTRY *pEntry)
    274276{
     277    RT_NOREF(pEntry);
     278
    275279    int rc = RTSemEventSignal(pWorker->hSubmitEvent);
    276280    if (RT_SUCCESS(rc))
     
    440444int crServerRpwEntryResizeCleaned(CR_SERVER_RPW *pWorker, CR_SERVER_RPW_ENTRY *pEntry, uint32_t width, uint32_t height)
    441445{
     446    RT_NOREF(pWorker);
     447
    442448    CRContext *pContext;
    443449    if (!width || !height)
  • trunk/src/VBox/HostServices/SharedOpenGL/crserverlib/server_stream.cpp

    r78190 r78263  
    930930crServerRecv( CRConnection *conn, CRMessage *msg, unsigned int len )
    931931{
     932    RT_NOREF(conn);
     933
    932934    CRMessage *pRealMsg;
    933935    (void) len;
  • trunk/src/VBox/HostServices/SharedOpenGL/crserverlib/server_viewport.cpp

    r78190 r78263  
    183183        }
    184184        mural->viewportValidated = GL_TRUE;
     185#else
     186        RT_NOREF(v, mural);
    185187#endif
    186188}
     
    221223                crServerApplyBaseProjection(&(extent->baseProjection));
    222224                cr_server.currentSerialNo = extent->serialNo;
    223         }               
     225        }
     226#else
     227        RT_NOREF(mural, extNum);
    224228#endif
    225229}
     
    272276void SERVER_DISPATCH_APIENTRY crServerDispatchViewport( GLint x, GLint y, GLsizei width, GLsizei height )
    273277{
    274         CRMuralInfo *mural = cr_server.curClient->currentMural;
    275278        CRContext *ctx = crStateGetCurrent();
    276279
  • trunk/src/VBox/HostServices/SharedOpenGL/crserverlib/server_window.cpp

    r78190 r78263  
    2020GLint crServerMuralInit(CRMuralInfo *mural, GLboolean fGuestWindow, GLint visBits, GLint preloadWinID)
    2121{
     22    RT_NOREF(fGuestWindow);
     23
    2224    CRMuralInfo *defaultMural;
    2325    GLint dims[2];
     
    237239static void crServerCleanupCtxMuralRefsCB(unsigned long key, void *data1, void *data2)
    238240{
     241    RT_NOREF(key);
     242
    239243    CRContextInfo *ctxInfo = (CRContextInfo *) data1;
    240244    CRMuralInfo *mural = (CRMuralInfo *) data2;
     
    336340}
    337341
    338 GLboolean crServerMuralSize(CRMuralInfo *mural, GLint width, GLint height)
     342GLboolean crServerMuralSize(CRMuralInfo *mural, GLuint width, GLuint height)
    339343{
    340344    if (mural->width == width && mural->height == height)
  • trunk/src/VBox/HostServices/SharedOpenGL/render/renderspu.c

    r78190 r78263  
    243243}
    244244
    245 ContextInfo * renderspuDefaultSharedContextAcquire()
     245ContextInfo * renderspuDefaultSharedContextAcquire(void)
    246246{
    247247    ContextInfo * pCtx = render_spu.defaultSharedContext;
     
    651651    WindowInfo *window;
    652652
     653    RT_NOREF(dpyName);
     654
    653655    if (id <= 0)
    654656    {
     
    731733    window = (WindowInfo *) crHashtableSearch(render_spu.windowTable, win);
    732734    if (window) {
    733         if (w != window->BltInfo.width
    734                 || h != window->BltInfo.height)
     735        if (   (GLuint)w != window->BltInfo.width
     736            || (GLuint)h != window->BltInfo.height)
    735737        {
    736738            /* window is resized, compositor data is no longer valid
     
    10631065{
    10641066    PCR_BLITTER pBlitter = renderspuVBoxPresentBlitterGetAndEnter(window, i32MakeCurrentUserData, fRedraw);
     1067
     1068    RT_NOREF(pChangedEntry);
    10651069    if (!pBlitter)
    10661070        return;
     
    11111115{
    11121116    WindowInfo *window = (WindowInfo *) data1;
     1117    RT_NOREF(key, data2);
     1118
    11131119    renderspuVBoxCompositorSet(window, NULL);
    11141120}
    11151121
    1116 void renderspuVBoxCompositorClearAll()
     1122void renderspuVBoxCompositorClearAll(void)
    11171123{
    11181124    /* we need to clear window compositor, which is not that trivial though,
     
    15061512}
    15071513
    1508 bool renderspuCalloutAvailable()
     1514bool renderspuCalloutAvailable(void)
    15091515{
    15101516    return render_spu.pfnClientCallout != NULL;
     
    18541860{
    18551861    WindowInfo *pWindow = (WindowInfo *)data1;
     1862    RT_NOREF(key, data2);
    18561863
    18571864    renderspu_SystemReparentWindow(pWindow);
  • trunk/src/VBox/HostServices/SharedOpenGL/render/renderspu.h

    r78251 r78263  
    339339extern void renderspu_SystemWindowVisibleRegion(WindowInfo *window, GLint cRects, const GLint* pRects);
    340340extern GLboolean renderspu_SystemWindowNeedEmptyPresent(WindowInfo *window);
    341 extern int renderspu_SystemInit();
    342 extern int renderspu_SystemTerm();
     341extern int renderspu_SystemInit(void);
     342extern int renderspu_SystemTerm(void);
    343343extern void renderspu_SystemDefaultSharedContextChanged(ContextInfo *fromContext, ContextInfo *toContext);
    344344extern void renderspu_SystemShowWindow( WindowInfo *window, GLboolean showIt );
     
    351351extern int renderspuCreateFunctions( SPUNamedFunctionTable table[] );
    352352extern GLboolean renderspuVBoxCompositorSet( WindowInfo *window, const struct VBOXVR_SCR_COMPOSITOR * pCompositor);
    353 extern void renderspuVBoxCompositorClearAll();
     353extern void renderspuVBoxCompositorClearAll(void);
    354354extern int renderspuVBoxCompositorLock(WindowInfo *window, const struct VBOXVR_SCR_COMPOSITOR **ppCompositor);
    355355extern int renderspuVBoxCompositorUnlock(WindowInfo *window);
     
    408408extern uint32_t renderspuContextMarkDeletedAndRelease( ContextInfo *context );
    409409
    410 int renderspuDefaultCtxInit();
     410int renderspuDefaultCtxInit(void);
    411411void renderspuCleanupBase(bool fDeleteTables);
    412412
    413 ContextInfo * renderspuDefaultSharedContextAcquire();
     413ContextInfo * renderspuDefaultSharedContextAcquire(void);
    414414void renderspuDefaultSharedContextRelease(ContextInfo * pCtx);
    415415uint32_t renderspuContextRelease(ContextInfo *context);
    416416uint32_t renderspuContextRetain(ContextInfo *context);
    417417
    418 bool renderspuCalloutAvailable();
     418bool renderspuCalloutAvailable(void);
    419419bool renderspuCalloutClient(PFNVCRSERVER_CLIENT_CALLOUT_CB pfnCb, void *pvCb);
    420420
  • trunk/src/VBox/HostServices/SharedOpenGL/render/renderspu_init.c

    r78251 r78263  
    100100#endif
    101101
    102 int renderspuDefaultCtxInit()
     102int renderspuDefaultCtxInit(void)
    103103{
    104104    GLint defaultWin, defaultCtx;
     
    367367    CRASSERT(window);
    368368
     369    RT_NOREF(key, data2);
     370
    369371    renderspuVBoxPresentBlitterCleanup( window );
    370372}
  • trunk/src/VBox/HostServices/SharedOpenGL/render/renderspu_wgl.c

    r78190 r78263  
    9999}
    100100
    101 int renderspuIatPatcherPatchEntry(void *pvEntry, void *pvValue, void **ppvOldVal)
    102 {
    103     void **ppfn = (void**)pvEntry;
     101int renderspuIatPatcherPatchEntry(void *pvEntry, PFNRT pfnValue, PFNRT *ppfnOldVal)
     102{
     103    PFNRT *ppfn = (PFNRT *)pvEntry;
    104104    DWORD dwOldProtect = 0;
    105105
     
    110110    }
    111111
    112     if (ppvOldVal)
    113         *ppvOldVal = *ppfn;
    114     *ppfn = pvValue;
     112    if (ppfnOldVal)
     113        *ppfnOldVal = *ppfn;
     114    *ppfn = pfnValue;
    115115
    116116    if (!VirtualProtect(pvEntry, sizeof (pvEntry), dwOldProtect, &dwOldProtect))
     
    123123
    124124
    125 int renderspuIatPatcherPatchFunction(HMODULE hModule, LPCSTR pszLib, LPCSTR pszName, void* pfn)
     125int renderspuIatPatcherPatchFunction(HMODULE hModule, LPCSTR pszLib, LPCSTR pszName, PFNRT pfn)
    126126{
    127127    void* pAdr;
     
    144144
    145145/* patch */
    146 static HWND __stdcall renderspuAtiQuirk_GetForegroundWindow()
     146static HWND __stdcall renderspuAtiQuirk_GetForegroundWindow(void)
    147147{
    148148    crDebug("renderspuAtiQuirk_GetForegroundWindow");
     
    279279    }
    280280
    281     rc = renderspuIatPatcherPatchFunction(hAtiDll, "user32.dll", "GetForegroundWindow", (void*)renderspuAtiQuirk_GetForegroundWindow);
     281    rc = renderspuIatPatcherPatchFunction(hAtiDll, "user32.dll", "GetForegroundWindow", (PFNRT)renderspuAtiQuirk_GetForegroundWindow);
    282282    if (RT_FAILURE(rc))
    283283    {
     
    311311
    312312
    313 static int renderspuAtiQuirk_Apply()
     313static int renderspuAtiQuirk_Apply(void)
    314314{
    315315    char aBuf[4096];
     
    337337}
    338338
    339 static GLboolean renderspuAtiQuirk_Needed()
    340 {
    341     const char * pszString = render_spu.ws.glGetString(GL_VENDOR);
     339static GLboolean renderspuAtiQuirk_Needed(void)
     340{
     341    const char * pszString = (const char *)render_spu.ws.glGetString(GL_VENDOR);
    342342    if (pszString && strstr(pszString, "ATI"))
    343343        return GL_TRUE;
    344     pszString = render_spu.ws.glGetString(GL_RENDERER);
     344    pszString = (const char *)render_spu.ws.glGetString(GL_RENDERER);
    345345    if (pszString && strstr(pszString, "ATI"))
    346346        return GL_TRUE;
     
    348348}
    349349
    350 static void renderspuAtiQuirk_ChkApply()
     350static void renderspuAtiQuirk_ChkApply(void)
    351351{
    352352    static GLboolean fChecked = GL_FALSE;
     
    506506    int attribList[100];
    507507    float fattribList[] = { 0.0, 0.0 };
    508     int numFormats;
     508    unsigned numFormats;
    509509    int i = 0;
    510510    BOOL vis;
     
    14001400        }
    14011401
     1402#if 0
    14021403        if (0/*render_spu.render_to_app_window && nativeWindow*/)
    14031404        {
     
    14391440        }
    14401441        else
     1442#endif
    14411443        {
    14421444            if (!context->hRC) {
     
    15831585GLboolean renderspu_SystemWindowNeedEmptyPresent(WindowInfo *window)
    15841586{
     1587    RT_NOREF(window);
    15851588    return GL_FALSE;
    15861589}
     
    16421645{
    16431646    int return_value;
     1647
     1648    RT_NOREF(flags);
    16441649
    16451650    /* peek at the windows message queue */
     
    17211726}
    17221727
    1723 int renderspu_SystemInit()
     1728int renderspu_SystemInit(void)
    17241729{
    17251730    return VINF_SUCCESS;
    17261731}
    17271732
    1728 int renderspu_SystemTerm()
     1733int renderspu_SystemTerm(void)
    17291734{
    17301735    return VINF_SUCCESS;
     
    17331738void renderspu_SystemDefaultSharedContextChanged(ContextInfo *fromContext, ContextInfo *toContext)
    17341739{
    1735 
     1740    RT_NOREF(fromContext, toContext);
    17361741}
    17371742
    17381743uint32_t renderspu_SystemPostprocessFunctions(SPUNamedFunctionTable *aFunctions, uint32_t cFunctions, uint32_t cTable)
    17391744{
     1745    RT_NOREF(aFunctions, cTable);
    17401746    return cFunctions;
    17411747}
  • trunk/src/VBox/HostServices/SharedOpenGL/unpacker/unpack_program.cpp

    r78190 r78263  
    294294void crUnpackExtendGetProgramStringARB(PCrUnpackerState pState)
    295295{
     296    RT_NOREF(pState);
    296297}
    297298
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