VirtualBox

Changeset 63204 in vbox for trunk/src/VBox/Additions/common


Ignore:
Timestamp:
Aug 9, 2016 1:36:53 PM (9 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
109830
Message:

GA/common/crOpenGL: warnings (gcc)

Location:
trunk/src/VBox/Additions/common/crOpenGL
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Additions/common/crOpenGL/context.c

    r62060 r63204  
    135135{
    136136    ContextInfo *context = (ContextInfo *) data1;
     137    RT_NOREF(key);
    137138
    138139    CRASSERT(context);
     
    252253
    253254#ifdef GLX
     255# if 0 /* unused */
    254256static XErrorHandler oldErrorHandler;
    255257static unsigned char lastXError = Success;
     
    258260errorHandler (Display *dpy, XErrorEvent *e)
    259261{
     262    RT_NOREF(dpy);
     263
    260264    lastXError = e->error_code;
    261265    return 0;
    262266}
     267# endif /* unused */
    263268#endif
    264269
     
    10951100    ContextInfo *pCtx = (ContextInfo *) data2;
    10961101
     1102    RT_NOREF(key);
     1103
     1104
    10971105    if (pWindow->pOwner == pCtx)
    10981106    {
  • trunk/src/VBox/Additions/common/crOpenGL/glx.c

    r62521 r63204  
    7474};
    7575
     76#ifndef VBOX_NO_NATIVEGL /* Old code */
    7677static struct VisualInfo *VisualInfoList = NULL;
     78#endif
    7779
    7880static void stubXshmUpdateImageRect(Display *dpy, GLXDrawable draw, GLX_Pixmap_t *pGlxPixmap, XRectangle *pRect);
    7981static void stubQueryXDamageExtension(Display *dpy, ContextInfo *pContext);
     82
     83#ifndef VBOX_NO_NATIVEGL /* Old code */
    8084
    8185static void
     
    154158    {GLX_SAMPLE_BUFFERS_SGIS, "GLX_SAMPLE_BUFFERS_SGIS", TEST_GREATER_0, CR_MULTISAMPLE_BIT},
    155159};
    156 #ifndef VBOX_NO_NATIVEGL  /* Currently not used */
     160
    157161static int QueryVisBits(Display *dpy, XVisualInfo *vis)
    158162{
     
    210214    return visBits;
    211215}
    212 #endif /* not 0 */
     216
     217#endif /* !VBOX_NO_NATIVEGL */
    213218
    214219
     
    564569    ContextInfo *context;
    565570    int visBits = CR_RGB_BIT | CR_DOUBLE_BIT | CR_DEPTH_BIT; /* default vis */
    566     int i, numExt;
    567571
    568572    stubInit();
     
    572576    /*
    573577    {
     578        int i, numExt;
    574579        char **list;
    575580
     
    667672    stubFindPixmapParms_t *pParms = (stubFindPixmapParms_t *) data2;
    668673    GLX_Pixmap_t *pGlxPixmap = (GLX_Pixmap_t *) crHashtableSearch(pCtx->pGLXPixmapsHash, (unsigned int) pParms->draw);
     674    (void)key;
    669675
    670676    if (pGlxPixmap)
     
    930936DECLEXPORT(int) VBOXGLXTAG(glXGetConfig)( Display *dpy, XVisualInfo *vis, int attrib, int *value )
    931937{
     938    (void)dpy;
     939
    932940    if (!vis) {
    933941        /* SGI OpenGL Performer hits this */
     
    11061114}
    11071115
     1116#ifdef VBOX_TEST_MEGOO
    11081117static XErrorHandler oldErrorHandler;
    11091118static unsigned char lastXError = Success;
     
    11121121errorHandler (Display *dpy, XErrorEvent *e)
    11131122{
     1123    (void)dpy;
    11141124    lastXError = e->error_code;
    11151125    return 0;
    11161126}
     1127#endif /* VBOX_TEST_MGEOO */
    11171128
    11181129DECLEXPORT(void) VBOXGLXTAG(glXSwapBuffers)( Display *dpy, GLXDrawable drawable )
     
    19471958{
    19481959    GLXFBConfig *pGLXFBConfigs = NULL;
    1949     struct VisualInfo *v;
    1950     int i=0, cVisuals;
     1960    /*struct VisualInfo *v; */
     1961    int i=0;
    19511962    XVisualInfo searchvis, *pVisuals;
    19521963
     
    20252036    (void) config;
    20262037   
     2038    /*
    20272039    struct VisualInfo *v;
    20282040
    2029     /*
    20302041    for (v = VisualInfoList; v; v = v->next) {
    20312042        if (v->dpy == dpy && v->visualid == (VisualID)config)
     
    24182429                pGlxPixmap->x, pGlxPixmap->y, pGlxPixmap->w, pGlxPixmap->h, rect.height);*/
    24192430
    2420         for (; (rect.y+rect.height)<=(pGlxPixmap->y+pGlxPixmap->h); rect.y+=rect.height)
     2431        for (; (rect.y+rect.height)<=(pGlxPixmap->y+(int)pGlxPixmap->h); rect.y+=rect.height)
    24212432        {
    24222433            stubXshmUpdateImageRect(dpy, draw, pGlxPixmap, &rect);
    24232434        }
    24242435
    2425         if (rect.y!=(pGlxPixmap->y+pGlxPixmap->h))
     2436        if (rect.y!=(pGlxPixmap->y+(int)pGlxPixmap->h))
    24262437        {
    24272438            rect.height=pGlxPixmap->h-rect.y;
     
    25282539DECLEXPORT(void) VBOXGLXTAG(glXBindTexImageEXT)(Display *dpy, GLXDrawable draw, int buffer, const int *attrib_list)
    25292540{
    2530     static int cnt=0;
    2531     XImage dummyimg;
    25322541    ContextInfo *context = stubGetCurrentContext();
    2533 
    25342542    GLX_Pixmap_t *pGlxPixmap;
     2543    RT_NOREF(buffer, attrib_list);
    25352544
    25362545    if (!context)
  • trunk/src/VBox/Additions/common/crOpenGL/load.c

    r62847 r63204  
    7070
    7171
     72#ifndef VBOX_NO_NATIVEGL
    7273static void stubInitNativeDispatch( void )
    7374{
    74 #define MAX_FUNCS 1000
     75# define MAX_FUNCS 1000
    7576    SPUNamedFunctionTable gl_funcs[MAX_FUNCS];
    7677    int numFuncs;
     
    8889    crSPUInitDispatch( &stub.nativeDispatch, gl_funcs );
    8990    crSPUInitDispatchNops( &stub.nativeDispatch );
    90 #undef MAX_FUNCS
    91 }
     91# undef MAX_FUNCS
     92}
     93#endif /* !VBOX_NO_NATIVEGL */
    9294
    9395
     
    178180    WindowInfo *pWindow = (WindowInfo *) data1;
    179181    ContextInfo *pCtx = (ContextInfo *) data2;
     182    (void)key;
    180183
    181184    if (pWindow == pCtx->currentDrawable
     
    252255}
    253256
    254 static void SPU_APIENTRY trapSwapBuffers(GLint window, GLint flags)
     257/*static void SPU_APIENTRY trapSwapBuffers(GLint window, GLint flags)
    255258{
    256259    stubCheckWindowsState();
     
    262265    stubCheckWindowsState();
    263266    origDrawBuffer(buf);
    264 }
    265 
     267}*/
     268
     269#if 0 /* unused */
    266270static void SPU_APIENTRY trapScissor(GLint x, GLint y, GLsizei w, GLsizei h)
    267271{
     
    270274    WindowInfo *pWindow;
    271275    ContextInfo *context = stubGetCurrentContext();
     276    (void)x; (void)y; (void)w; (void)h;
     277
    272278    pWindow = context->currentDrawable;
    273279    stubGetWindowGeometry(pWindow, &winX, &winY, &winW, &winH);
    274280    origScissor(0, 0, winW, winH);
    275281}
     282#endif /* unused */
    276283
    277284/**
     
    301308}
    302309
     310#if 0 /** @todo stubSPUTearDown & stubSPUTearDownLocked are not referenced */
     311
    303312// Callback function, used to destroy all created contexts
    304313static void hsWalkStubDestroyContexts(unsigned long key, void *data1, void *data2)
    305314{
     315    (void)data1; (void)data2;
    306316    stubDestroyContext(key);
    307317}
     
    378388    STUB_INIT_UNLOCK();
    379389}
     390
     391#endif /** @todo stubSPUTearDown & stubSPUTearDownLocked are not referenced */
    380392
    381393static void stubSPUSafeTearDown(void)
     
    498510static void stubSignalHandler(int signo)
    499511{
     512    (void)signo;
    500513    stubSPUSafeTearDown();
    501514    exit(0);  /* this causes stubExitHandler() to be called */
     
    721734#endif /* 0 */
    722735
    723 void stubSetDefaultConfigurationOptions(void)
     736static void stubSetDefaultConfigurationOptions(void)
    724737{
    725738    unsigned char key[16]= {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0};
     
    755768#ifdef CR_NEWWINTRACK
    756769# ifdef VBOX_WITH_WDDM
    757 static stubDispatchVisibleRegions(WindowInfo *pWindow)
     770static void stubDispatchVisibleRegions(WindowInfo *pWindow)
    758771{
    759772    DWORD dwCount;
     
    798811{
    799812    WindowInfo *pWindow = (WindowInfo *) data1;
    800     (void) data2;
     813    (void)key; (void) data2;
    801814
    802815    if (pWindow->type!=CHROMIUM || pWindow->spuWindow==0)
     
    942955     */
    943956
    944     CRConnection *conn = NULL;
    945957    char response[1024];
    946958    char **spuchain;
  • trunk/src/VBox/Additions/common/crOpenGL/stub.c

    r59505 r63204  
    156156void APIENTRY crVBoxTexPresent(GLuint texture, GLuint cfg, GLint xPos, GLint yPos, GLint cRects, const GLint *pRects)
    157157{
     158    RT_NOREF(texture, cfg, xPos, yPos, cRects, pRects);
    158159    crError("not expected!");
    159160}
  • trunk/src/VBox/Additions/common/crOpenGL/stub.h

    r55621 r63204  
    284284extern CRtsd g_stubCurrentContextTSD;
    285285
    286 DECLINLINE(ContextInfo*) stubGetCurrentContext()
     286DECLINLINE(ContextInfo*) stubGetCurrentContext(void)
    287287{
    288288    ContextInfo* ctx;
Note: See TracChangeset for help on using the changeset viewer.

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