VirtualBox

Changeset 63199 in vbox for trunk/src/VBox


Ignore:
Timestamp:
Aug 9, 2016 11:40:19 AM (8 years ago)
Author:
vboxsync
Message:

GuestHost/OpenGL: warnings (gcc).

Location:
trunk/src/VBox/GuestHost/OpenGL
Files:
43 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/GuestHost/OpenGL/include/chromium.h

    r63118 r63199  
    6565#ifndef WINDOWS
    6666# ifndef RT_OS_WINDOWS /* If we don't need it in ring-3, we probably not need it in ring-0 either (triggers warnings). */
     67#  if 1
     68#   pragma GCC diagnostic push
     69#   pragma GCC diagnostic ignored "-Wstrict-prototypes"
     70#  endif
    6771#include <GL/glu.h>
     72#  if 1
     73#   pragma GCC diagnostic pop
     74#  endif
    6875# endif /* !RT_OS_WINDOWS */
    6976#endif
  • trunk/src/VBox/GuestHost/OpenGL/include/cr_error.h

    r56183 r63199  
    5252DECLEXPORT(void) crInfo(const char *format, ... ) PRINTF;
    5353
    54 DECLEXPORT(void) crError(const char *format, ... ) NORETURN_PRINTF;
     54DECLEXPORT(void) crError(const char *format, ... ) PRINTF /*NORETURN_PRINTF - it returns*/;
    5555
    5656/* Throw more info while opengl is not stable */
     
    5959#  include <iprt/assert.h>
    6060#  define CRASSERT Assert
    61 //extern int g_VBoxFbgFBreakDdi;
     61/*extern int g_VBoxFbgFBreakDdi;*/
    6262#  define CR_DDI_PROLOGUE() do { /*if (g_VBoxFbgFBreakDdi) {Assert(0);}*/ } while (0)
    6363# else
  • trunk/src/VBox/GuestHost/OpenGL/include/cr_net.h

    r50984 r63199  
    266266
    267267extern DECLEXPORT(void) crNetInit( CRNetReceiveFunc recvFunc, CRNetCloseFunc closeFunc );
    268 extern DECLEXPORT(void) crNetTearDown();
     268extern DECLEXPORT(void) crNetTearDown(void);
    269269
    270270extern DECLEXPORT(void) *crNetAlloc( CRConnection *conn );
     
    288288#if defined(VBOX_WITH_CRHGSMI) && defined(IN_GUEST)
    289289                CRConnection *conn
     290#else
     291                void
    290292#endif
    291293        );
     
    307309#endif
    308310#ifdef IN_GUEST
    309 extern DECLEXPORT(uint32_t) crNetHostCapsGet();
     311extern DECLEXPORT(uint32_t) crNetHostCapsGet(void);
    310312#endif
    311313extern DECLEXPORT(void) crNetDefaultRecv( CRConnection *conn, CRMessage *msg, unsigned int len );
  • trunk/src/VBox/GuestHost/OpenGL/include/cr_protocol.h

    r53802 r63199  
    100100} CRNetworkPointer;
    101101
    102 #if 0 //def DEBUG_misha
     102#if 0 /*def DEBUG_misha*/
    103103#define CRDBGPTR_SETZ(_p) crMemset((_p), 0, sizeof (CRNetworkPointer))
    104104#define CRDBGPTR_CHECKZ(_p) do { \
  • trunk/src/VBox/GuestHost/OpenGL/packer/pack_client.c

    r62808 r63199  
    443443        }
    444444    }
    445 #endif // CR_EXT_secondary_color
     445#endif /* CR_EXT_secondary_color */
    446446
    447447
     
    459459        crPackFogCoordfEXT( *((GLfloat *) p) );
    460460    }
    461 #endif // CR_EXT_fog_coord
     461#endif /* CR_EXT_fog_coord */
    462462
    463463    for (unit = 0 ; unit < CR_MAX_TEXTURE_UNITS ; unit++)
     
    803803        crPackBegin(mode);
    804804
    805     //crDebug("crPackExpandDrawElements mode:0x%x, count:%d, type:0x%x", mode, count, type);
     805    /*crDebug("crPackExpandDrawElements mode:0x%x, count:%d, type:0x%x", mode, count, type);*/
    806806
    807807    switch (type)
  • trunk/src/VBox/GuestHost/OpenGL/packer/pack_texture.c

    r52451 r63199  
    799799    }
    800800
    801     //crDebug( "Compressing that shit: %d", level );
     801    /*crDebug( "Compressing that shit: %d", level );*/
    802802
    803803    data_ptr = (unsigned char *) crPackAlloc( packet_length );
  • trunk/src/VBox/GuestHost/OpenGL/spu_loader/dispatch.py

    r15532 r63199  
    119119                if (ptr[i] == NULL) {
    120120                        /*printf("!!!!!!!Warning entry[%d] = NULL\n", i);*/
    121                         ptr[i] = (void *)NopFunction;
     121                        ptr[i] = (void *)(uintptr_t)NopFunction;
    122122                }
    123123        }
  • trunk/src/VBox/GuestHost/OpenGL/spu_loader/glloader.py

    r62812 r63199  
    4646#define SYSTEM_GL "libGL.so.1"
    4747#endif
    48 typedef void (*glxfuncptr)();
     48typedef void (*glxfuncptr)(void);
    4949extern glxfuncptr glxGetProcAddressARB( const GLubyte *name );
    5050#else
     
    8585
    8686#ifndef WINDOWS
    87 static int FileExists(char *directory, char *filename)
     87/*static int FileExists(char *directory, char *filename)
    8888{
    8989        FILE *f;
     
    102102            return 0;
    103103        }
    104 }
     104}*/
    105105#endif
    106106
  • trunk/src/VBox/GuestHost/OpenGL/spu_loader/spuchange.py

    r62814 r63199  
    3333keys = apiutil.GetDispatchedFunctions(sys.argv[1]+"/APIspec.txt")
    3434for func_name in keys:
    35         print '\tif ((void *)table->%s == orig_func)' % func_name
     35        print '\tif ((uintptr_t)table->%s == (uintptr_t)orig_func)' % func_name
    3636        print '\t{'
    37         print '\t\ttable->%s = (%sFunc_t)new_func;' % (func_name, func_name)
     37        print '\t\ttable->%s = (%sFunc_t)(uintptr_t)new_func;' % (func_name, func_name)
    3838        print '\t\tfor (temp = table->copyList ; temp ; temp = temp->next)'
    3939        print '\t\t{'
     
    6565    print '\tif (func && ((SPUGenericFunction)dispatch->%s!=func))' % func_name
    6666    print '\t{'
    67     print '\t\tcrDebug("%%s changed from %%p to %%p", "gl%s", dispatch->%s, func);' % (func_name, func_name)
    68     print '\t\tcrSPUChangeInterface(dispatch, (void *)dispatch->%s, func);' % func_name
     67    print '\t\tcrDebug("%%s changed from %%p to %%p", "gl%s", (void *)(uintptr_t)dispatch->%s, (void *)(uintptr_t)func);' % (func_name, func_name)
     68    print '\t\tcrSPUChangeInterface(dispatch, (void *)(uintptr_t)dispatch->%s, (void *)(uintptr_t)func);' % func_name
    6969    print '\t}\n'
    7070print """
  • trunk/src/VBox/GuestHost/OpenGL/spu_loader/spuinit.c

    r33540 r63199  
    2727    table->server = NULL;
    2828}
     29
     30#if 0 /* unused */
    2931
    3032static int validate_int( const char *response,
     
    161163    return retval;
    162164}
     165
     166#endif /* unused */
    163167
    164168/** Use the default values for all the options:
  • trunk/src/VBox/GuestHost/OpenGL/state_tracker/state_bufferobject.c

    r48491 r63199  
    974974                             CRContext *fromCtx, CRContext *toCtx)
    975975{
    976     CRBufferObjectState *from = &(fromCtx->bufferobject);
    977     const CRBufferObjectState *to = &(toCtx->bufferobject);
     976    /*CRBufferObjectState *from = &(fromCtx->bufferobject); - unused
     977    const CRBufferObjectState *to = &(toCtx->bufferobject); - unused */
    978978
    979979    if (!HaveBufferObjectExtension())
     
    987987    CRBufferObject *pBufferObj = (CRBufferObject *) data1;
    988988    CRBufferObjectState *pState = (CRBufferObjectState *) data2;
     989    (void)key;
    989990
    990991    if (pBufferObj->id && !pBufferObj->hwid)
     
    10201021                               CRContext *fromCtx, CRContext *toCtx)
    10211022{
    1022     const CRBufferObjectState *from = &(fromCtx->bufferobject);
     1023    /*const CRBufferObjectState *from = &(fromCtx->bufferobject); - unused */
    10231024    CRBufferObjectState *to = &(toCtx->bufferobject);
    10241025    int i;
  • trunk/src/VBox/GuestHost/OpenGL/state_tracker/state_client.c

    r51319 r63199  
    15351535  /* XXX todo */
    15361536    crWarning("crStateVertexArrayRangeNV not implemented");
     1537    (void)length; (void)pointer;
    15371538}
    15381539
     
    15471548#define CRSTATE_IS_SERVER_CP(cp) (!(cp).enabled || !(cp).p || ((cp).buffer && (cp).buffer->id) || ((cp).locked))
    15481549
     1550#if defined(DEBUG) && 0
    15491551static void crStateDumpClientPointer(CRClientPointer *cp, const char *name, int i)
    15501552{
     
    15521554  {
    15531555    crDebug("CP(%s): enabled:%d ptr:%p buffer:%p buffer.name:%i locked: %i %s",
    1554             name, cp->enabled, cp->p, cp->buffer, cp->buffer? cp->buffer->id:-1, (int)cp->locked,
     1556            name, cp->enabled, cp->p, cp->buffer, cp->buffer ? cp->buffer->id : ~(GLuint)0, (int)cp->locked,
    15551557            CRSTATE_IS_SERVER_CP(*cp) ? "":"!FAIL!");
    15561558  }
     
    15581560  {
    15591561    crDebug("CP(%s%i): enabled:%d ptr:%p buffer:%p buffer.name:%i locked: %i %s",
    1560             name, i, cp->enabled, cp->p, cp->buffer, cp->buffer? cp->buffer->id:-1, (int)cp->locked,
     1562            name, i, cp->enabled, cp->p, cp->buffer, cp->buffer ? cp->buffer->id : ~(GLuint)0, (int)cp->locked,
    15611563            CRSTATE_IS_SERVER_CP(*cp) ? "":"!FAIL!");
    15621564  }
    15631565}
     1566#endif
    15641567
    15651568#ifdef DEBUG_misha
    15661569/* debugging */
    1567 //# define CR_NO_SERVER_ARRAYS
     1570/*# define CR_NO_SERVER_ARRAYS*/
    15681571#endif
    15691572
  • trunk/src/VBox/GuestHost/OpenGL/state_tracker/state_current.c

    r51313 r63199  
    366366             (toCtx->extensions.NV_vertex_program))) {
    367367        const unsigned attribsUsedMask = toCtx->current.attribsUsedMask;
    368         int i;
    369368        for (i = 1; i < CR_MAX_VERTEX_ATTRIBS; i++) {  /* skip zero */
    370369            if ((attribsUsedMask & (1 << i))
  • trunk/src/VBox/GuestHost/OpenGL/state_tracker/state_enable.c

    r44326 r63199  
    389389                case GL_MAP1_VERTEX_ATTRIB15_4_NV:
    390390                        {
    391                                 const GLint i = cap - GL_MAP1_VERTEX_ATTRIB0_4_NV;
    392                                 g->eval.enableAttrib1D[i] = val;
    393                                 DIRTY(sb->program.map1AttribArrayEnable[i], neg_bitid);
     391                                const GLint idx = cap - GL_MAP1_VERTEX_ATTRIB0_4_NV;
     392                                g->eval.enableAttrib1D[idx] = val;
     393                                DIRTY(sb->program.map1AttribArrayEnable[idx], neg_bitid);
    394394                                DIRTY(sb->program.dirty, neg_bitid);
    395395                        }
     
    412412                case GL_MAP2_VERTEX_ATTRIB15_4_NV:
    413413                        {
    414                                 const GLint i = cap - GL_MAP2_VERTEX_ATTRIB0_4_NV;
    415                                 g->eval.enableAttrib2D[i] = val;
    416                                 DIRTY(sb->program.map2AttribArrayEnable[i], neg_bitid);
     414                                const GLint idx = cap - GL_MAP2_VERTEX_ATTRIB0_4_NV;
     415                                g->eval.enableAttrib2D[idx] = val;
     416                                DIRTY(sb->program.map2AttribArrayEnable[idx], neg_bitid);
    417417                                DIRTY(sb->program.dirty, neg_bitid);
    418418                        }
  • trunk/src/VBox/GuestHost/OpenGL/state_tracker/state_fence.c

    r15532 r63199  
    1313void APIENTRY crStateGenFencesNV(GLsizei n, GLuint *fences)
    1414{
     15    (void)n; (void)fences;
    1516}
    1617
     
    1819void APIENTRY crStateDeleteFencesNV(GLsizei n, const GLuint *fences)
    1920{
     21    (void)n; (void)fences;
    2022}
    2123
    2224void APIENTRY crStateSetFenceNV(GLuint fence, GLenum condition)
    2325{
     26    (void)fence; (void)condition;
    2427}
    2528
    2629GLboolean APIENTRY crStateTestFenceNV(GLuint fence)
    2730{
    28    return GL_FALSE;
     31    (void)fence;
     32    return GL_FALSE;
    2933}
    3034
    3135void APIENTRY crStateFinishFenceNV(GLuint fence)
    3236{
     37    (void)fence;
    3338}
    3439
    3540GLboolean APIENTRY crStateIsFenceNV(GLuint fence)
    3641{
    37    return GL_FALSE;
     42    (void)fence;
     43    return GL_FALSE;
    3844}
    3945
    4046void APIENTRY crStateGetFenceivNV(GLuint fence, GLenum pname, GLint *params)
    4147{
     48    (void)fence; (void)pname; (void)params;
    4249}
    4350
  • trunk/src/VBox/GuestHost/OpenGL/state_tracker/state_framebuffer.c

    r62814 r63199  
    228228{
    229229    CRContext *g = GetCurrentContext();
    230     CRFramebufferObjectState *fbo = &g->framebufferobject;
     230    /*CRFramebufferObjectState *fbo = &g->framebufferobject; - unused */
    231231    int i;
    232232
     
    481481/*@todo: move this function somewhere else*/
    482482/*return floor of base 2 log of x. log(0)==0*/
    483 unsigned int crLog2Floor(unsigned int x)
     483static unsigned int crLog2Floor(unsigned int x)
    484484{
    485485    x |= (x >> 1);
     
    614614{
    615615    CRContext *g = GetCurrentContext();
    616     CRFramebufferObjectState *fbo = &g->framebufferobject;
     616    /*CRFramebufferObjectState *fbo = &g->framebufferobject; - unused */
    617617    CRFBOAttachmentPoint *aap[2];
    618618    GLuint cap, i;
     
    648648{
    649649    CRContext *g = GetCurrentContext();
    650     CRFramebufferObjectState *fbo = &g->framebufferobject;
     650    /* CRFramebufferObjectState *fbo = &g->framebufferobject; - unused */
    651651    CRFBOAttachmentPoint *aap[2];
    652652    GLuint cap, i;
     
    686686{
    687687    CRContext *g = GetCurrentContext();
    688     CRFramebufferObjectState *fbo = &g->framebufferobject;
     688    /* CRFramebufferObjectState *fbo = &g->framebufferobject; - unused */
    689689    CRFBOAttachmentPoint *aap[2];
    690690    GLuint cap, i;
     
    727727    CRFBOAttachmentPoint *aap[2];
    728728    CRRenderbufferObject *rb;
     729    (void)renderbuffertarget;
    729730
    730731    CRSTATE_CHECKERR(g->current.inBeginEnd, GL_INVALID_OPERATION, "called in begin/end");
     
    872873crStateGenerateMipmapEXT(GLenum target)
    873874{
     875    (void)target;
    874876    /*@todo*/
    875877}
     
    878880{
    879881    CRRenderbufferObject *pRBO = (CRRenderbufferObject*) data1;
     882    (void)key; (void)data2;
    880883
    881884    diff_api.GenRenderbuffersEXT(1, &pRBO->hwid);
     
    943946    CRContext *ctx = (CRContext*) data2;
    944947    GLint i;
     948    (void)key;
    945949
    946950    diff_api.GenFramebuffersEXT(1, &pFBO->hwid);
     
    10891093    CRContext *g = GetCurrentContext();
    10901094    CRFramebufferObject *pFBO = (CRFramebufferObject*) crHashtableSearch(g->shared->fbTable, id);
    1091 #if 0 //def DEBUG_misha
     1095#if 0 /*def DEBUG_misha*/
    10921096    crDebug("FB id(%d) hw(%d)", id, pFBO ? pFBO->hwid : 0);
    10931097#endif
  • trunk/src/VBox/GuestHost/OpenGL/state_tracker/state_glsl.c

    r62492 r63199  
    136136    CRContext *ctx = (CRContext*) data2;
    137137    CRGLSLShader *pRealShader;
    138     (void) key;
     138    (void) key; (void)ctx;
    139139
    140140    pRealShader = crStateGetShaderObj(pShader->id);
     
    406406static void crStateDbgCheckNoProgramOfId(void *data)
    407407{
     408    (void)data;
    408409    crError("Unexpected Program id");
    409410}
     
    849850    }
    850851
    851     if (cbData<sizeof(GLsizei))
     852    if (cbData<(GLsizei)sizeof(GLsizei))
    852853    {
    853854        crWarning("crStateGLSLProgramCacheUniforms: data too short");
     
    859860    cbRead = sizeof(GLsizei);
    860861
    861     //crDebug("crStateGLSLProgramCacheUniforms: %i active uniforms", pProgram->cUniforms);
     862    /*crDebug("crStateGLSLProgramCacheUniforms: %i active uniforms", pProgram->cUniforms);*/
    862863
    863864    if (pProgram->cUniforms)
     
    896897        pCurrent += cbName;
    897898
    898         //crDebug("crStateGLSLProgramCacheUniforms: uniform[%i]=%d, %s", i, pProgram->pUniforms[i].location, pProgram->pUniforms[i].name);
     899        /*crDebug("crStateGLSLProgramCacheUniforms: uniform[%i]=%d, %s", i, pProgram->pUniforms[i].location, pProgram->pUniforms[i].name);*/
    899900    }
    900901
     
    925926    }
    926927
    927     if (cbData<sizeof(GLsizei))
     928    if (cbData<(GLsizei)sizeof(GLsizei))
    928929    {
    929930        WARN(("crStateGLSLProgramCacheAttribs: data too short"));
     
    991992    }
    992993
    993     //crDebug("crStateGLSLProgramCacheUniforms: uniform[%i]=%s.", location, pName);
     994    /*crDebug("crStateGLSLProgramCacheUniforms: uniform[%i]=%s.", location, pName);*/
    994995
    995996    ((GLint*)*pCurrent)[0] = location;
     
    13221323    CRGLSLShader *pShader = (CRGLSLShader*) data1;
    13231324    CRContext *ctx = (CRContext *) data2;
     1325    (void)ctx; (void)key;
    13241326
    13251327    pShader->hwid = diff_api.CreateShader(pShader->type);
     
    13871389    CRContext *ctx = (CRContext *) data2;
    13881390    GLuint i;
     1391    (void)key;
    13891392
    13901393    pProgram->hwid = diff_api.CreateProgram();
  • trunk/src/VBox/GuestHost/OpenGL/state_tracker/state_init.c

    r57423 r63199  
    7676}
    7777
    78 void crStateReleaseTextureInternal(CRSharedState *pS, CRContext *pCtx, CRTextureObj *pObj)
     78static void crStateReleaseTextureInternal(CRSharedState *pS, CRContext *pCtx, CRTextureObj *pObj)
    7979{
    8080    Assert(CR_STATE_SHAREDOBJ_USAGE_IS_USED(pObj) || pObj->pinned);
     
    102102}
    103103
    104 void crStateReleaseBufferObjectInternal(CRSharedState *pS, CRContext *pCtx, CRBufferObject *pObj)
     104static void crStateReleaseBufferObjectInternal(CRSharedState *pS, CRContext *pCtx, CRBufferObject *pObj)
    105105{
    106106    Assert(CR_STATE_SHAREDOBJ_USAGE_IS_USED(pObj));
     
    110110}
    111111
    112 void crStateReleaseFBOInternal(CRSharedState *pS, CRContext *pCtx, CRFramebufferObject *pObj)
     112static void crStateReleaseFBOInternal(CRSharedState *pS, CRContext *pCtx, CRFramebufferObject *pObj)
    113113{
    114114    Assert(CR_STATE_SHAREDOBJ_USAGE_IS_USED(pObj));
     
    118118}
    119119
    120 void crStateReleaseRBOInternal(CRSharedState *pS, CRContext *pCtx, CRRenderbufferObject *pObj)
     120static void crStateReleaseRBOInternal(CRSharedState *pS, CRContext *pCtx, CRRenderbufferObject *pObj)
    121121{
    122122    Assert(CR_STATE_SHAREDOBJ_USAGE_IS_USED(pObj));
     
    130130    PCR_STATE_RELEASEOBJ pData = (PCR_STATE_RELEASEOBJ)data2;
    131131    CRTextureObj *pObj = (CRTextureObj *)data1;
     132    (void)key;
    132133    crStateReleaseTextureInternal(pData->s, pData->pCtx, pObj);
    133134}
     
    137138    PCR_STATE_RELEASEOBJ pData = (PCR_STATE_RELEASEOBJ)data2;
    138139    CRBufferObject *pObj = (CRBufferObject *)data1;
     140    (void)key;
    139141    crStateReleaseBufferObjectInternal(pData->s, pData->pCtx, pObj);
    140142}
     
    144146    PCR_STATE_RELEASEOBJ pData = (PCR_STATE_RELEASEOBJ)data2;
    145147    CRFramebufferObject *pObj = (CRFramebufferObject *)data1;
     148    (void)key;
    146149    crStateReleaseFBOInternal(pData->s, pData->pCtx, pObj);
    147150}
     
    151154    PCR_STATE_RELEASEOBJ pData = (PCR_STATE_RELEASEOBJ)data2;
    152155    CRRenderbufferObject *pObj = (CRRenderbufferObject *)data1;
     156    (void)key;
    153157    crStateReleaseRBOInternal(pData->s, pData->pCtx, pObj);
    154158}
     159
    155160
    156161/**
    157162 * Decrement shared state's refcount and delete when it hits zero.
    158163 */
    159 DECLEXPORT(void)
    160 crStateFreeShared(CRContext *pContext, CRSharedState *s)
     164#ifndef IN_GUEST
     165DECLEXPORT(void) crStateFreeShared(CRContext *pContext, CRSharedState *s)
     166#else
     167static void crStateFreeShared(CRContext *pContext, CRSharedState *s)
     168#endif
    161169{
    162170    int32_t refCount = ASMAtomicDecS32(&s->refCount);
     
    188196}
    189197
    190 DECLEXPORT(CRSharedState *) crStateGlobalSharedAcquire()
     198#ifndef IN_GUEST
     199
     200DECLEXPORT(CRSharedState *) crStateGlobalSharedAcquire(void)
    191201{
    192202    if (!gSharedState)
     
    199209}
    200210
    201 DECLEXPORT(void) crStateGlobalSharedRelease()
     211DECLEXPORT(void) crStateGlobalSharedRelease(void)
    202212{
    203213    crStateFreeShared(NULL, gSharedState);
    204214}
     215
     216#endif /* IN_GUEST */
    205217
    206218DECLEXPORT(void) STATE_APIENTRY
     
    298310 */
    299311static CRContext *
    300 crStateCreateContextId(int i, const CRLimitsState *limits,
    301                                              GLint visBits, CRContext *shareCtx)
     312crStateCreateContextId(int i, const CRLimitsState *limits, GLint visBits, CRContext *shareCtx)
    302313{
    303314    CRContext *ctx;
     
    305316    int node32 = i >> 5;
    306317    int node = i & 0x1f;
     318    (void)limits;
    307319
    308320    if (g_pAvailableContexts[i] != NULL)
     
    800812{
    801813    /* This no-op function helps smooth code-gen */
     814    (void)target; (void)value;
    802815}
    803816
     
    806819{
    807820    /* This no-op function helps smooth code-gen */
     821    (void)target; (void)value;
    808822}
    809823
     
    812826{
    813827    /* This no-op function helps smooth code-gen */
     828    (void)target; (void)type; (void)count; (void)values;
    814829}
    815830
     
    818833{
    819834    /* This no-op function helps smooth code-gen */
     835    (void)target; (void)index; (void)type; (void)count; (void)values;
    820836}
    821837
     
    825841{
    826842    /* This no-op function helps smooth code-gen */
    827 }
    828 
    829 void crStateVBoxDetachThread()
     843    (void)x; (void)y; (void)width; (void)height; (void)format; (void)type; (void)pixels;
     844}
     845
     846void crStateVBoxDetachThread(void)
    830847{
    831848    /* release the context ref so that it can be freed */
     
    834851
    835852
    836 void crStateVBoxAttachThread()
    837 {
    838 }
     853void crStateVBoxAttachThread(void)
     854{
     855}
     856
     857#if 0 /* who's refering to these? */
    839858
    840859GLint crStateVBoxCreateContext( GLint con, const char * dpyName, GLint visual, GLint shareCtx )
    841860{
     861    (void)con; (void)dpyName; (void)visual; (void)shareCtx;
    842862    return 0;
    843863}
     
    845865GLint crStateVBoxWindowCreate( GLint con, const char *dpyName, GLint visBits  )
    846866{
     867    (void)con; (void)dpyName; (void)visBits;
    847868    return 0;
    848869}
     
    850871void crStateVBoxWindowDestroy( GLint con, GLint window )
    851872{
     873    (void)con; (void)window;
    852874}
    853875
    854876GLint crStateVBoxConCreate(struct VBOXUHGSMI *pHgsmi)
    855877{
     878    (void)pHgsmi;
    856879    return 0;
    857880}
     
    859882void crStateVBoxConDestroy(GLint con)
    860883{
     884    (void)con;
    861885}
    862886
    863887void crStateVBoxConFlush(GLint con)
    864888{
    865 }
     889    (void)con;
     890}
     891
     892#endif /* unused? */
  • trunk/src/VBox/GuestHost/OpenGL/state_tracker/state_lists.c

    r52263 r63199  
    1414{
    1515    /* nothing - dlists are in shared state */
     16    (void)ctx;
    1617}
    1718
     
    3132}
    3233
    33 //#define CRSTATE_DEBUG_QUERY_HW_STATE
     34/*#define CRSTATE_DEBUG_QUERY_HW_STATE*/
    3435
    3536#ifndef CRSTATE_DEBUG_QUERY_HW_STATE
     
    173174    CRContext *g = GetCurrentContext();
    174175    CRStateBits *sb = GetCurrentBits();
    175     CRbitvalue *bitID=g->bitid, *negbitID=g->neg_bitid;
     176    CRbitvalue /* *bitID=g->bitid, */ *negbitID=g->neg_bitid;
    176177
    177178    CRASSERT(g_bVBoxEnableDiffOnMakeCurrent);
     
    819820    {
    820821        int i;
    821         const int gleval_sizes[] = {4, 1, 3, 1, 2, 3, 4, 3, 4};
     822        const int gleval_sizes_dup[] = {4, 1, 3, 1, 2, 3, 4, 3, 4};
    822823
    823824        if (CHECKDIRTY(sb->eval.enable, negbitID))
     
    850851                if (order>0)
    851852                {
    852                     coeffs = crAlloc(order * gleval_sizes[i] * sizeof(GLfloat));
     853                    coeffs = crAlloc(order * gleval_sizes_dup[i] * sizeof(GLfloat));
    853854                    if (!coeffs)
    854855                    {
     
    889890                if (order[0]>0 && order[1]>0)
    890891                {
    891                     coeffs = crAlloc(order[0] * order[1] * gleval_sizes[i] * sizeof(GLfloat));
     892                    coeffs = crAlloc(order[0] * order[1] * gleval_sizes_dup[i] * sizeof(GLfloat));
    892893                    if (!coeffs)
    893894                    {
  • trunk/src/VBox/GuestHost/OpenGL/state_tracker/state_occlude.c

    r15532 r63199  
    138138        CRContext *g = GetCurrentContext();
    139139        CROcclusionState *o = &(g->occlusion);
     140        (void)target;
    140141
    141142        FLUSH();
     
    323324{
    324325        /* Apparently, no occlusion state differencing needed */
     326        (void)bb; (void)bitID; (void)fromCtx; (void)toCtx;
    325327}
    326328
     
    336338         * glEndQuery sequence.
    337339         */
     340        (void)bb; (void)bitID; (void)fromCtx; (void)toCtx;
    338341        CRASSERT(!fromCtx->occlusion.currentQueryObject);
    339342}
  • trunk/src/VBox/GuestHost/OpenGL/state_tracker/state_polygon.txt

    r15532 r63199  
    1515:mode:frontMode:PolygonMode,GL_FRONT
    1616-:stipple:stipple:*diff_api.PolygonStipple ((GLubyte *) to->stipple);
    17 +:stipple:*int j;
     17+:stipple:*int iStripple;
    1818+:stipple:*diff_api.PolygonStipple ((GLubyte *) to->stipple);
    19 +:stipple:*for (j=0; j<32; j++)
     19+:stipple:*for (iStripple=0; iStripple<32; iStripple++)
    2020+:stipple:*{
    21 +:stipple:*     from->stipple[j] = to->stipple[j];
     21+:stipple:*     from->stipple[iStripple] = to->stipple[iStripple];
    2222+:stipple:*}
  • trunk/src/VBox/GuestHost/OpenGL/state_tracker/state_program.c

    r48491 r63199  
    23012301    CRProgram *pProgram = (CRProgram *) pProg;
    23022302    uint32_t i;
     2303    (void)key;
    23032304
    23042305    if (pProgram->isARBprogram)
     
    23482349    CRProgram *pOrigVP, *pOrigFP;
    23492350
    2350     (void) bForceUpdate;
     2351    (void) bForceUpdate; (void)bitID;
    23512352
    23522353    /* save original bindings */
  • trunk/src/VBox/GuestHost/OpenGL/state_tracker/state_stencil.c

    r62814 r63199  
    102102static void crStateStencilBufferFunc(CRContext *g, CRStencilBufferState *s, GLenum func, GLint ref, GLuint mask)
    103103{
     104    (void)g;
    104105    s->func = func;
    105106    s->ref = ref;
     
    171172static void STATE_APIENTRY crStateStencilBufferOp (CRContext *g, CRStencilBufferState *s, GLenum fail, GLenum zfail, GLenum zpass)
    172173{
     174    (void)g;
    173175    s->fail = fail;
    174176    s->passDepthFail = zfail;
  • trunk/src/VBox/GuestHost/OpenGL/state_tracker/state_texdiff.c

    r44947 r63199  
    13791379    struct callback_info *info = (struct callback_info *) cbData;
    13801380    CRTextureObj *tobj = (CRTextureObj *) texObj;
     1381    (void)key;
     1382
    13811383    /*
    13821384    printf("  Checking %d 0x%x  bitid=0x%x\n",tobj->name, tobj->dirty[0], info->bitID[0]);
  • trunk/src/VBox/GuestHost/OpenGL/state_tracker/state_teximage.c

    r46235 r63199  
    575575    CRContext *g = GetCurrentContext();
    576576    CRTextureState *t = &(g->texture);
     577#ifndef CR_STATE_NO_TEXTURE_IMAGE_STORE
    577578    CRClientState *c = &(g->client);
     579#endif
    578580    CRTextureObj *tobj;
    579581    CRTextureLevel *tl;
    580582    CRStateBits *sb = GetCurrentBits();
    581583    CRTextureBits *tb = &(sb->texture);
     584#ifdef CR_STATE_NO_TEXTURE_IMAGE_STORE
     585    (void)pixels;
     586#endif
    582587
    583588    FLUSH();
     
    685690    CRTextureObj *tobj = NULL;
    686691    CRTextureLevel *tl = NULL;
     692    (void)x; (void)y;
    687693   
    688694    crStateGetTextureObjectAndImage(g, target, level, &tobj, &tl);
     
    727733    CRContext *g = GetCurrentContext();
    728734    CRTextureState *t = &(g->texture);
     735#ifndef CR_STATE_NO_TEXTURE_IMAGE_STORE
    729736    CRClientState *c = &(g->client);
     737#endif
    730738    CRTextureObj *tobj = NULL;
    731739    CRTextureLevel *tl = NULL;
     
    864872    CRContext *g = GetCurrentContext();
    865873    CRTextureState *t = &(g->texture);
     874#ifndef CR_STATE_NO_TEXTURE_IMAGE_STORE
    866875    CRClientState *c = &(g->client);
     876#endif
    867877    CRTextureObj *tobj = NULL;
    868878    CRTextureLevel *tl = NULL;
    869879    CRStateBits *sb = GetCurrentBits();
    870880    CRTextureBits *tb = &(sb->texture);
     881    (void)pixels;
    871882
    872883    FLUSH();
     
    959970    CRContext *g = GetCurrentContext();
    960971    CRTextureState *t = &(g->texture);
     972#ifndef CR_STATE_NO_TEXTURE_IMAGE_STORE
    961973    CRClientState *c = &(g->client);
     974#endif
    962975    CRStateBits *sb = GetCurrentBits();
    963976    CRTextureBits *tb = &(sb->texture);
     
    965978    CRTextureObj *tobj = unit->currentTexture1D;
    966979    CRTextureLevel *tl = tobj->level[0] + level;
     980    (void)format; (void)type; (void)pixels;
    967981
    968982    FLUSH();
     
    10101024{
    10111025    CRContext *g = GetCurrentContext();
    1012     CRClientState *c = &(g->client);
    10131026    CRStateBits *sb = GetCurrentBits();
    10141027    CRTextureBits *tb = &(sb->texture);
    10151028    CRTextureObj *tobj;
    10161029    CRTextureLevel *tl;
     1030#ifndef CR_STATE_NO_TEXTURE_IMAGE_STORE
     1031    CRClientState *c = &(g->client);
    10171032    GLubyte *subimg = NULL;
    10181033    GLubyte *img = NULL;
    1019 #ifndef CR_STATE_NO_TEXTURE_IMAGE_STORE
    10201034    GLubyte *src;
    10211035    int i;
    10221036#endif
     1037    (void)format; (void)type; (void)pixels;
    10231038
    10241039    FLUSH();
     
    11051120    CRContext *g = GetCurrentContext();
    11061121    CRTextureState *t = &(g->texture);
    1107     CRClientState *c = &(g->client);
    11081122    CRStateBits *sb = GetCurrentBits();
    11091123    CRTextureBits *tb = &(sb->texture);
     
    11111125    CRTextureObj *tobj = unit->currentTexture3D;
    11121126    CRTextureLevel *tl = tobj->level[0] + level;
     1127#ifndef CR_STATE_NO_TEXTURE_IMAGE_STORE
     1128    CRClientState *c = &(g->client);
    11131129    GLubyte *subimg = NULL;
    11141130    GLubyte *img = NULL;
    1115 #ifndef CR_STATE_NO_TEXTURE_IMAGE_STORE
    11161131    GLubyte *src;
    11171132    int i;
    11181133#endif
     1134    (void)format; (void)type; (void)pixels;
    11191135
    11201136    FLUSH();
     
    11911207    CRStateBits *sb = GetCurrentBits();
    11921208    CRTextureBits *tb = &(sb->texture);
     1209    (void)data;
    11931210
    11941211    FLUSH();
     
    12711288    CRStateBits *sb = GetCurrentBits();
    12721289    CRTextureBits *tb = &(sb->texture);
     1290    (void)data;
    12731291
    12741292    FLUSH();
     
    13521370    CRStateBits *sb = GetCurrentBits();
    13531371    CRTextureBits *tb = &(sb->texture);
     1372    (void)data;
    13541373
    13551374    FLUSH();
     
    14331452    CRTextureObj *tobj = unit->currentTexture1D;
    14341453    CRTextureLevel *tl = tobj->level[0] + level;
     1454    (void)format; (void)imageSize; (void)data;
    14351455
    14361456    FLUSH();
     
    14901510    CRTextureObj *tobj = unit->currentTexture2D;
    14911511    CRTextureLevel *tl = tobj->level[0] + level;
     1512    (void)format; (void)imageSize; (void)data;
    14921513
    14931514    FLUSH();
     
    15521573    CRTextureObj *tobj = unit->currentTexture3D;
    15531574    CRTextureLevel *tl = tobj->level[0] + level;
     1575    (void)format; (void)imageSize; (void)data;
    15541576
    15551577    FLUSH();
     
    16481670{
    16491671    CRContext *g = GetCurrentContext();
     1672#ifndef CR_STATE_NO_TEXTURE_IMAGE_STORE
    16501673    CRClientState *c = &(g->client);
     1674#endif
    16511675    CRTextureObj *tobj;
    16521676    CRTextureLevel *tl;
  • trunk/src/VBox/GuestHost/OpenGL/state_tracker/state_texture.c

    r58226 r63199  
    622622{
    623623    GLint i;
     624    (void)g;
    624625    for (i = 0; i < n; i++)
    625626    {
     
    33903391    if (tobj)
    33913392    {
    3392 //        crDebug("tex id(%d), hwid(%d)", tobj->id, tobj->hwid);
     3393/*        crDebug("tex id(%d), hwid(%d)", tobj->id, tobj->hwid);*/
    33933394    }
    33943395#endif
     
    34073408        CRASSERT(diff_api.GenTextures);
    34083409        diff_api.GenTextures(1, &tobj->hwid);
    3409 #if 0 //def DEBUG_misha
     3410#if 0 /*def DEBUG_misha*/
    34103411        crDebug("tex id(%d), hwid(%d)", tobj->id, tobj->hwid);
    34113412#endif
  • trunk/src/VBox/GuestHost/OpenGL/util/blitter.cpp

    r62814 r63199  
    8282
    8383    RTRECT Intersection;
    84     const RTPOINT ZeroPoint = {0, 0};
     84    /*const RTPOINT ZeroPoint = {0, 0}; - unused */
    8585
    8686    for (uint32_t i = 0; i < cRects; ++i)
     
    573573DECLINLINE(GLint*) crBltVtRectTF(const RTRECT *pRect, uint32_t normalX, uint32_t normalY, GLint* pBuff, uint32_t height)
    574574{
     575    (void)normalX; (void)normalY;
     576
    575577    /* xLeft yTop */
    576578    pBuff[0] = pRect->xLeft;
     
    11151117VBOXBLITTERDECL(int) CrBltImgGetMural(PCR_BLITTER pBlitter, bool fBb, CR_BLITTER_IMG *pDst)
    11161118{
     1119    (void)fBb; (void)pDst;
    11171120    if (!CrBltIsEntered(pBlitter))
    11181121    {
     
    20302033    }
    20312034
    2032     Assert(width == pScaledCache->Tex.width);
    2033     Assert(height == pScaledCache->Tex.height);
     2035    Assert(width == (uint32_t)pScaledCache->Tex.width);
     2036    Assert(height == (uint32_t)pScaledCache->Tex.height);
    20342037
    20352038    if (!pScaledCache->Flags.DataValid)
     
    20572060VBOXBLITTERDECL(int) CrTdBltDataAcquireScaled(PCR_TEXDATA pTex, GLenum enmFormat, bool fInverted, uint32_t width, uint32_t height, const CR_BLITTER_IMG**ppImg)
    20582061{
    2059     if (pTex->Tex.width == width && pTex->Tex.height == height)
     2062    if ((uint32_t)pTex->Tex.width == width && (uint32_t)pTex->Tex.height == height)
    20602063        return CrTdBltDataAcquire(pTex, enmFormat, fInverted, ppImg);
    20612064
  • trunk/src/VBox/GuestHost/OpenGL/util/bufpool.c

    r53726 r63199  
    115115        /* check that the buffer to push isn't already in the pool! */
    116116        {
    117             const Buffer *b;
    118             for (b = pool->head; b; b = b->next) {
    119                 CRASSERT(b->address != buf);
     117            const Buffer *bd;
     118            for (bd = pool->head; bd; bd = bd->next) {
     119                CRASSERT(bd->address != buf);
    120120            }
    121121        }
  • trunk/src/VBox/GuestHost/OpenGL/util/compositor.cpp

    r62492 r63199  
    105105{
    106106    uint32_t* pCounter = (uint32_t*)pvVisitor;
     107    (void)pCompositor; (void)pEntry;
     108
    107109    Assert(VBoxVrListRectsCount(&pEntry->Vr));
    108110    *pCounter += VBoxVrListRectsCount(&pEntry->Vr);
     
    495497                                                  CR_TEXDATA *pTex)
    496498{
     499    (void)pCompositor;
     500
    497501    if (pEntry->pTex == pTex)
    498502        return VINF_SUCCESS;
  • trunk/src/VBox/GuestHost/OpenGL/util/devnull.c

    r53726 r63199  
    8282        (void) conn;
    8383        (void) port;
     84        (void) hostname;
    8485}
    8586
  • trunk/src/VBox/GuestHost/OpenGL/util/dll.c

    r62812 r63199  
    228228        return NULL;
    229229    }
    230 # endif // CR_NO_GL_SYSTEM_PATH
     230# endif /* CR_NO_GL_SYSTEM_PATH */
    231231#endif
    232232
     
    328328
    329329#elif defined(IRIX) || defined(IRIX64) || defined(Linux) || defined(FreeBSD) || defined(AIX) || defined(SunOS) || defined(OSF1)
    330         return (CRDLLFunc) dlsym( dll->hinstLib, symname );
     330        return (CRDLLFunc)(uintptr_t)dlsym( dll->hinstLib, symname );
    331331#else
    332332#error CR DLL ARCHITETECTURE
  • trunk/src/VBox/GuestHost/OpenGL/util/error.c

    r62814 r63199  
    3333# include "VBox/VBoxGuestLib.h"
    3434# include "iprt/initterm.h"
     35#else
     36# include "cr_error.h"
    3537#endif
    3638
     
    7779}
    7880
     81#ifdef WINDOWS
    7982static void logMessage(const char *pszPrefix, const char *pszFormat, ...)
    8083{
     
    8588    va_end(va);
    8689}
     90#endif
    8791
    8892DECLEXPORT(void) crError(const char *pszFormat, ...)
  • trunk/src/VBox/GuestHost/OpenGL/util/filenet.c

    r53726 r63199  
    9292crFileAccept( CRConnection *conn, const char *hostname, unsigned short port )
    9393{
     94        (void)hostname;
    9495        conn->file_direction = CR_FILE_READ;
    9596        conn->fd = open( conn->filename, O_RDONLY | O_BINARY );
  • trunk/src/VBox/GuestHost/OpenGL/util/hash.c

    r62814 r63199  
    274274    }
    275275
    276 //    Assert(id != 2);
     276/*    Assert(id != 2);*/
    277277
    278278    RTListForEachSafe(&pool->freeList, f, next, FreeElem, Node)
  • trunk/src/VBox/GuestHost/OpenGL/util/list.c

    r62814 r63199  
    312312}
    313313
    314 #endif // CR_TESTING_LIST
     314#endif /* CR_TESTING_LIST */
  • trunk/src/VBox/GuestHost/OpenGL/util/net.c

    r53726 r63199  
    388388        conn->hostname = crStrdup( filename );
    389389
    390     /* call the protocol-specific init routines */  // ktd (add)
     390    /* call the protocol-specific init routines */  /* ktd (add) */
    391391    InitConnection(conn, protocol_only, mtu
    392392#if defined(VBOX_WITH_CRHGSMI) && defined(IN_GUEST)
    393393                , NULL
    394394#endif
    395             );       // ktd (add)
     395            );       /* ktd (add) */
    396396    }
    397397    else {
     
    513513
    514514/* Free up stuff */
    515 void crNetTearDown()
     515void crNetTearDown(void)
    516516{
    517517    CRNetReceiveFuncList *rfl;
     
    12741274
    12751275#ifdef IN_GUEST
    1276 uint32_t crNetHostCapsGet()
     1276uint32_t crNetHostCapsGet(void)
    12771277{
    12781278#ifdef VBOX_WITH_HGCM
     
    12941294#if defined(VBOX_WITH_CRHGSMI) && defined(IN_GUEST)
    12951295        CRConnection *conn
     1296#else
     1297        void
    12961298#endif
    12971299        )
     
    13631365crNetSetContextRange( int low_context, int high_context )
    13641366{
     1367#if !defined(TEAC_SUPPORT) && !defined(TCSCOMM_SUPPORT)
     1368    (void)low_context; (void)high_context;
     1369#endif
    13651370#ifdef TEAC_SUPPORT
    13661371    crTeacSetContextRange( low_context, high_context );
     
    13771382crNetSetNodeRange( const char *low_node, const char *high_node )
    13781383{
     1384#if !defined(TEAC_SUPPORT) && !defined(TCSCOMM_SUPPORT)
     1385    (void)low_node; (void)high_node;
     1386#endif
    13791387#ifdef TEAC_SUPPORT
    13801388    crTeacSetNodeRange( low_node, high_node );
     
    13931401#ifdef TEAC_SUPPORT
    13941402    crTeacSetKey( key, keyLength );
    1395 #endif
    1396 }
     1403#else
     1404    (void)key; (void)keyLength;
     1405#endif
     1406}
  • trunk/src/VBox/GuestHost/OpenGL/util/net_internals.h

    r53726 r63199  
    100100#if defined(VBOX_WITH_CRHGSMI) && defined(IN_GUEST)
    101101        CRConnection *conn
     102#else
     103        void
    102104#endif
    103105        );
    104106#ifdef IN_GUEST
    105 extern uint32_t crVBoxHGCMHostCapsGet();
     107extern uint32_t crVBoxHGCMHostCapsGet(void);
    106108#endif
    107109extern CRConnection** crVBoxHGCMDump( int *num );
  • trunk/src/VBox/GuestHost/OpenGL/util/pixel.c

    r62814 r63199  
    15961596            }
    15971597            else
    1598                 //crDebug("Sending texture, BytesPerRow!=RowStrideBytes");
     1598                /*crDebug("Sending texture, BytesPerRow!=RowStrideBytes");*/
    15991599                for (i = 0; i < height; i++)
    16001600                {
  • trunk/src/VBox/GuestHost/OpenGL/util/process.c

    r58583 r63199  
    229229{
    230230#ifdef WINDOWS
    231   //return _getpid();
     231  /*return _getpid();*/
    232232  return GetCurrentProcess();
    233233#else
  • trunk/src/VBox/GuestHost/OpenGL/util/tcpip.c

    r62814 r63199  
    519519    char            host[NI_MAXHOST];
    520520#endif
     521    (void)hostname;
    521522
    522523    cr_tcpip.server_sock = CreateListeningSocket(port);
     
    12781279        if ( conn->tcp_socket < 0 )
    12791280        {
    1280             int err = crTCPIPErrno( );
    1281             if (err != EAFNOSUPPORT)
    1282                 crWarning( "socket error: %s, trying another way", crTCPIPErrorString( err ) );
     1281            int err2 = crTCPIPErrno( );
     1282            if (err2 != EAFNOSUPPORT)
     1283                crWarning( "socket error: %s, trying another way", crTCPIPErrorString( err2 ) );
    12831284            cur=cur->ai_next;
    12841285            continue;
  • trunk/src/VBox/GuestHost/OpenGL/util/udptcpip.c

    r61992 r63199  
    521521                else if ( FD_ISSET(conn->udp_socket, &read_fds ) )
    522522                {
    523                         CRTCPIPBuffer *buf = ((CRTCPIPBuffer *) crTCPIPAlloc( conn )) - 1;
    524                         unsigned int *seq = ((unsigned int *) (buf + 1)) - 1;
    525                         int len;
     523                        unsigned int *seq;
     524                        buf = ((CRTCPIPBuffer *) crTCPIPAlloc( conn )) - 1;
     525                        seq = ((unsigned int *) (buf + 1)) - 1;
    526526
    527527                        len = recv( conn->udp_socket, (void *)seq,
  • trunk/src/VBox/GuestHost/OpenGL/util/vboxhgcm.c

    r63064 r63199  
    6464#define CRASSERT Assert
    6565#endif
    66 //#define IN_GUEST
    67 //#if defined(IN_GUEST)
    68 //#define VBOX_WITH_CRHGSMIPROFILE
    69 //#endif
     66/*#define IN_GUEST
     67#if defined(IN_GUEST)
     68#define VBOX_WITH_CRHGSMIPROFILE
     69#endif */
    7070#ifdef VBOX_WITH_CRHGSMIPROFILE
    7171#include <iprt/time.h>
     
    101101{
    102102    uint64_t cStartTime;
    103 //    bool bDisable;
     103/*    bool bDisable;*/
    104104} VBOXCRHGSMIPROFILE_SCOPE, *PVBOXCRHGSMIPROFILE_SCOPE;
    105105
     
    131131DECLINLINE(void) vboxCrHgsmiProfileScopeEnter(PVBOXCRHGSMIPROFILE_SCOPE pScope)
    132132{
    133 //    pScope->bDisable = false;
     133/*    pScope->bDisable = false; */
    134134    pScope->cStartTime = VBOXCRHGSMIPROFILE_GET_TIME_NANO();
    135135}
     
    137137DECLINLINE(void) vboxCrHgsmiProfileScopeExit(PVBOXCRHGSMIPROFILE_SCOPE pScope)
    138138{
    139 //    if (!pScope->bDisable)
     139/*    if (!pScope->bDisable) */
    140140    {
    141141        uint64_t cTime = VBOXCRHGSMIPROFILE_GET_TIME_NANO();
     
    522522    pSubm->fFlags.Value = 0;
    523523    pSubm->fFlags.bDoNotRetire = 1;
    524 //    pSubm->fFlags.bDoNotSignalCompletion = 1; /* <- we do not need that actually since
    525 //                                                       * in case we want completion,
    526 //                                                       * we will block in _crVBoxHGSMICmdBufferGetRc (when locking the buffer)
    527 //                                                       * which is needed for getting the result */
     524# if 0
     525    pSubm->fFlags.bDoNotSignalCompletion = 1; /* <- we do not need that actually since
     526                                               * in case we want completion,
     527                                               * we will block in _crVBoxHGSMICmdBufferGetRc (when locking the buffer)
     528                                               * which is needed for getting the result */
     529# endif
    528530}
    529531#endif
     
    549551#endif
    550552
     553#ifndef IN_GUEST
    551554/*@todo get rid of it*/
    552555static bool _crVBoxHGCMWriteBytes(CRConnection *conn, const void *buf, uint32_t len)
     
    576579    return TRUE;
    577580}
     581#endif
    578582
    579583/**
     
    588592{
    589593#ifdef IN_GUEST
    590 # if defined(VBOX_WITH_CRHGSMI)
     594# ifndef VBOX_WITH_CRHGSMI
     595    RT_NOREF(conn);
     596# else
    591597    PCRVBOXHGSMI_CLIENT pClient = g_crvboxhgcm.bHgsmiOn ? _crVBoxHGSMIClientGet(conn) : NULL;
    592598    if (pClient)
     
    681687# endif /*#ifdef RT_OS_WINDOWS*/
    682688    }
    683 #else /*#ifdef IN_GUEST*/
     689
     690#else  /* IN_GUEST */
     691    RT_NOREF(conn, pvData, cbData);
    684692    crError("crVBoxHGCMCall called on host side!");
    685693    CRASSERT(FALSE);
    686694    return VERR_NOT_SUPPORTED;
    687 #endif
     695#endif /* IN_GUEST */
    688696}
    689697
     
    805813    CRVBOXHGCMREAD parms;
    806814    int rc;
     815    RT_NOREF(buf, len);
    807816
    808817    parms.hdr.result      = VERR_WRONG_ORDER;
     
    811820    parms.hdr.cParms      = SHCRGL_CPARMS_READ;
    812821
    813     CRASSERT(!conn->pBuffer); //make sure there's no data to process
     822    CRASSERT(!conn->pBuffer); /* make sure there's no data to process */
    814823    parms.pBuffer.type                   = VMMDevHGCMParmType_LinAddr_Out;
    815824    parms.pBuffer.u.Pointer.size         = conn->cbHostBufferAllocated;
     
    829838    if (parms.cbBuffer.u.value32)
    830839    {
    831         //conn->pBuffer  = (uint8_t*) parms.pBuffer.u.Pointer.u.linearAddr;
     840        /*conn->pBuffer  = (uint8_t*) parms.pBuffer.u.Pointer.u.linearAddr; */
    832841        conn->pBuffer  = conn->pHostBuffer;
    833842        conn->cbBuffer = parms.cbBuffer.u.value32;
     
    858867    parms.pBuffer.u.Pointer.u.linearAddr = (uintptr_t) buf;
    859868
    860     CRASSERT(!conn->pBuffer); //make sure there's no data to process
     869    CRASSERT(!conn->pBuffer); /*make sure there's no data to process*/
    861870    parms.pWriteback.type                   = VMMDevHGCMParmType_LinAddr_Out;
    862871    parms.pWriteback.u.Pointer.size         = conn->cbHostBufferAllocated;
     
    965974    if (parms.cbWriteback.u.value32)
    966975    {
    967         //conn->pBuffer  = (uint8_t*) parms.pWriteback.u.Pointer.u.linearAddr;
     976        /*conn->pBuffer  = (uint8_t*) parms.pWriteback.u.Pointer.u.linearAddr;*/
    968977        conn->pBuffer  = conn->pHostBuffer;
    969978        conn->cbBuffer = parms.cbWriteback.u.value32;
     
    987996    {
    988997#ifndef IN_GUEST
    989             //@todo remove temp buffer allocation in unpacker
     998            /**@todo remove temp buffer allocation in unpacker*/
    990999            /* we're at the host side, so just store data until guest polls us */
    9911000            _crVBoxHGCMWriteBytes(conn, start, len);
     
    11071116#endif
    11081117            if (g_crvboxhgcm.bufpool) {
    1109                 //@todo o'rly?
     1118                /**@todo o'rly? */
    11101119                /* pool may have been deallocated just a bit earlier in response
    11111120                 * to a SIGPIPE (Broken Pipe) signal.
     
    11541163    if (conn->allow_redir_ptr)
    11551164    {
    1156 #endif //IN_GUEST
     1165#endif
    11571166        CRASSERT(conn->buffer_size >= sizeof(CRMessageRedirPtr));
    11581167
     
    12041213        cached_type = msg->header.type;
    12051214    }
    1206 #endif //IN_GUEST
     1215#endif /* !IN_GUEST*/
    12071216
    12081217    conn->recv_credits     -= len;
     
    12421251static void crVBoxHGCMAccept( CRConnection *conn, const char *hostname, unsigned short port )
    12431252{
     1253    RT_NOREF(hostname, port);
    12441254    VBOXCRHGSMIPROFILE_FUNC_PROLOGUE();
    12451255    CRASSERT(conn && conn->pHostBuffer);
     
    12541264    CRVBOXHGCMSETVERSION parms;
    12551265    int rc;
     1266    RT_NOREF(vMajor, vMinor);
    12561267
    12571268    parms.hdr.result      = VERR_WRONG_ORDER;
     
    16161627static void crVBoxHGCMHandleNewMessage( CRConnection *conn, CRMessage *msg, unsigned int len )
    16171628{
     1629    RT_NOREF(conn, msg, len);
    16181630    VBOXCRHGSMIPROFILE_FUNC_PROLOGUE();
    16191631    CRASSERT(FALSE);
     
    17631775    parms->hdr.u32ClientID = conn->u32ClientID;
    17641776    parms->hdr.u32Function = SHCRGL_GUEST_FN_READ;
    1765 //    parms->hdr.u32Reserved = 0;
    1766 
    1767     CRASSERT(!conn->pBuffer); //make sure there's no data to process
     1777/*    parms->hdr.u32Reserved = 0;*/
     1778
     1779    CRASSERT(!conn->pBuffer); /* make sure there's no data to process */
    17681780    parms->iBuffer = 1;
    17691781    parms->cbBuffer = 0;
     
    18381850    PVBOXUHGSMI_BUFFER pBuf = NULL;
    18391851    VBOXUHGSMI_BUFFER_LOCK_FLAGS fFlags;
    1840 //    uint32_t cbBuffer;
     1852/*    uint32_t cbBuffer;*/
    18411853
    18421854    parms->hdr.result      = VERR_WRONG_ORDER;
    18431855    parms->hdr.u32ClientID = conn->u32ClientID;
    18441856    parms->hdr.u32Function = SHCRGL_GUEST_FN_WRITE_READ;
    1845 //    parms->hdr.u32Reserved = 0;
     1857/*    parms->hdr.u32Reserved = 0;*/
    18461858
    18471859    parms->iBuffer = 1;
    18481860
    1849     CRASSERT(!conn->pBuffer); //make sure there's no data to process
     1861    CRASSERT(!conn->pBuffer); /* make sure there's no data to process */
    18501862    parms->iWriteback = 2;
    18511863    parms->cbWriteback = 0;
     
    20162028        parms->hdr.u32ClientID = conn->u32ClientID;
    20172029        parms->hdr.u32Function = SHCRGL_GUEST_FN_INJECT;
    2018 //        parms->hdr.u32Reserved = 0;
     2030/*        parms->hdr.u32Reserved = 0;*/
    20192031
    20202032        parms->u32ClientID = conn->u32InjectClientID;
     
    20502062        parms->hdr.u32ClientID = conn->u32ClientID;
    20512063        parms->hdr.u32Function = SHCRGL_GUEST_FN_WRITE;
    2052 //        parms->hdr.u32Reserved = 0;
     2064/*        parms->hdr.u32Reserved = 0; */
    20532065
    20542066        parms->iBuffer = 1;
     
    21002112        {
    21012113#ifndef IN_GUEST
    2102                 //@todo remove temp buffer allocation in unpacker
     2114                /** @todo remove temp buffer allocation in unpacker */
    21032115                /* we're at the host side, so just store data until guest polls us */
    21042116                _crVBoxHGCMWriteBytes(conn, start, len);
     
    23992411
    24002412/* Callback function used to free buffer pool entries */
    2401 void crVBoxHGCMBufferFree(void *data)
     2413static void crVBoxHGCMBufferFree(void *data)
    24022414{
    24032415    CRVBOXHGCMBUFFER *hgcm_buffer = (CRVBOXHGCMBUFFER *) data;
     
    25282540    conn->allow_redir_ptr = 1;
    25292541
    2530     //@todo remove this crap at all later
     2542    /** @todo remove this crap at all later */
    25312543    conn->cbHostBufferAllocated = 2*1024;
    25322544    conn->pHostBuffer = (uint8_t*) crAlloc(conn->cbHostBufferAllocated);
     
    25642576
    25652577#if defined(IN_GUEST)
    2566 void _crVBoxHGCMPerformPollHost(CRConnection *conn)
     2578static void _crVBoxHGCMPerformPollHost(CRConnection *conn)
    25672579{
    25682580    if (conn->type == CR_NO_CONNECTION )
     
    25862598#endif
    25872599
    2588 void _crVBoxHGCMPerformReceiveMessage(CRConnection *conn)
     2600static void _crVBoxHGCMPerformReceiveMessage(CRConnection *conn)
    25892601{
    25902602    if ( conn->type == CR_NO_CONNECTION )
     
    25982610
    25992611#ifdef IN_GUEST
    2600 uint32_t crVBoxHGCMHostCapsGet()
     2612uint32_t crVBoxHGCMHostCapsGet(void)
    26012613{
    26022614    Assert(g_crvboxhgcm.fHostCapsInitialized);
     
    26082620#if defined(VBOX_WITH_CRHGSMI) && defined(IN_GUEST)
    26092621        CRConnection *conn
     2622#else
     2623        void
    26102624#endif
    26112625        )
  • trunk/src/VBox/GuestHost/OpenGL/util/vreg.cpp

    r62814 r63199  
    401401}
    402402
     403#if 0 /* unused */
    403404/**
    404405 * @returns Entry to be iterated next. ListHead is returned to break the
     
    435436    }
    436437}
     438#endif /* unused */
    437439
    438440static void vboxVrListJoinRectsHV(PVBOXVR_LIST pList, bool fHorizontal)
     
    712714}
    713715
     716#if 0 /* unused */
     717
    714718static DECLCALLBACK(PRTLISTNODE) vboxVrListIntersectNoJoinNonintersectedCb(PVBOXVR_LIST pList1, PVBOXVR_REG pReg1, void *pvContext)
    715719{
     
    730734}
    731735
    732 #if 0 /* unused */
    733736static DECLCALLBACK(PRTLISTNODE) vboxVrListIntersectNoJoinIntersectedCb(PVBOXVR_LIST pList1, PVBOXVR_REG pReg1, PCRTRECT pRect2,
    734737                                                                        void *pvContext, PPRTLISTNODE ppNext)
     
    755758    return &pReg1->ListEntry;
    756759}
    757 #endif
     760
     761#endif /* unused */
    758762
    759763static int vboxVrListIntersectNoJoin(PVBOXVR_LIST pList, PCVBOXVR_LIST pList2, bool *pfChanged)
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