VirtualBox

Changeset 62814 in vbox for trunk/src/VBox/GuestHost


Ignore:
Timestamp:
Aug 1, 2016 12:51:52 PM (9 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
109401
Message:

GuestHost/OpenGL: warnings

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

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/GuestHost/OpenGL/packer/pack_pixels.c

    r52451 r62814  
    118118    unsigned char *data_ptr;
    119119    int data_length = 0;
    120     GLubyte *destBitmap = NULL;
     120    /*GLubyte *destBitmap = NULL; - unused */
    121121    int packet_length =
    122122        sizeof( width ) +
     
    210210    CR_GET_PACKER_CONTEXT(pc);
    211211    unsigned char *data_ptr;
    212     (void) pc;
     212    (void) pc; (void) packstate;
    213213    CR_GET_BUFFERED_POINTER( pc, 40 );
    214214    WRITE_DATA( 0, GLint, 40 );
  • trunk/src/VBox/GuestHost/OpenGL/packer/pack_shaders.c

    r62492 r62814  
    476476        CR_GET_PACKER_CONTEXT(pc);
    477477        unsigned char *data_ptr;
    478         (void) pc;
     478        (void) pc; (void) obj;
    479479        CR_GET_BUFFERED_POINTER(pc, 32);
    480480        WRITE_DATA(0, GLint, 32);
     
    493493        CR_GET_PACKER_CONTEXT(pc);
    494494        unsigned char *data_ptr;
    495         (void) pc;
     495        (void) pc; (void) infoLog;
    496496        CR_GET_BUFFERED_POINTER(pc, 32);
    497497        WRITE_DATA(0, GLint, 32);
  • trunk/src/VBox/GuestHost/OpenGL/packer/pack_visibleregion.c

    r62812 r62814  
    5353void PACK_APIENTRY crPackWindowVisibleRegionSWAP( CR_PACKER_CONTEXT_ARGDECL  GLint window, GLint cRects, const GLint * pRects )
    5454{
     55    RT_NOREF3(window, cRects, pRects);
    5556    crError( "crPackWindowVisibleRegionSWAP unimplemented and shouldn't be called" );
    5657}
  • trunk/src/VBox/GuestHost/OpenGL/spu_loader/spuchange.py

    r36231 r62814  
    6666    print '\t{'
    6767    print '\t\tcrDebug("%%s changed from %%p to %%p", "gl%s", dispatch->%s, func);' % (func_name, func_name)
    68     print '\t\tcrSPUChangeInterface(dispatch, dispatch->%s, func);' % func_name
     68    print '\t\tcrSPUChangeInterface(dispatch, (void *)dispatch->%s, func);' % func_name
    6969    print '\t}\n'
    7070print """
  • trunk/src/VBox/GuestHost/OpenGL/state_tracker/state_diff.c

    r55798 r62814  
    143143int crStateAcquireFBImage(CRContext *to, CRFBData *data)
    144144{
    145     CRBufferState *pBuf = &to->buffer;
     145    /*CRBufferState *pBuf = &to->buffer; - unused */
    146146    CRPixelPackState packing = to->client.pack;
    147147    uint32_t i;
     
    280280{
    281281    {
    282         CRBufferState *pBuf = &to->buffer;
     282        /*CRBufferState *pBuf = &to->buffer; - unused */
    283283        CRPixelPackState unpack = to->client.unpack;
    284284        uint32_t i;
     
    597597}
    598598
    599 GLenum crStateCleanHWErrorState()
     599GLenum crStateCleanHWErrorState(void)
    600600{
    601601    GLenum err;
  • trunk/src/VBox/GuestHost/OpenGL/state_tracker/state_framebuffer.c

    r62492 r62814  
    592592
    593593    CRSTATE_CHECKERR_RET(level<0, GL_INVALID_VALUE, "level<0", 0);
    594     CRSTATE_CHECKERR_RET(level>maxtexsizelog2, GL_INVALID_VALUE, "level too big", 0);
     594    CRSTATE_CHECKERR_RET((GLuint)level>maxtexsizelog2, GL_INVALID_VALUE, "level too big", 0);
    595595
    596596#ifdef IN_GUEST
     
    703703    }
    704704
    705     CRSTATE_CHECKERR(zoffset>(g->limits.max3DTextureSize-1), GL_INVALID_VALUE, "zoffset too big");
     705    CRSTATE_CHECKERR(zoffset>((GLint)g->limits.max3DTextureSize-1), GL_INVALID_VALUE, "zoffset too big");
    706706    CRSTATE_CHECKERR(textarget!=GL_TEXTURE_3D, GL_INVALID_OPERATION, "textarget");
    707707
  • trunk/src/VBox/GuestHost/OpenGL/state_tracker/state_snapshot.c

    r62492 r62814  
    5555    CRASSERT(pSSM && pBuffer && cbBuffer>0);
    5656
    57     *pBuffer = crAlloc(cbBuffer);
     57    *pBuffer = crAlloc((unsigned int /* this case is just so stupid */)cbBuffer);
    5858    if (!*pBuffer)
    5959        return VERR_NO_MEMORY;
     
    779779            if (bReallocMem)
    780780            {
    781                 pEval[i].coeff = (GLfloat*) crAlloc(size);
     781                pEval[i].coeff = (GLfloat*) crAlloc((unsigned int /* this case is just so stupid */)size);
    782782                if (!pEval[i].coeff) return VERR_NO_MEMORY;
    783783            }
     
    802802            if (bReallocMem)
    803803            {
    804                 pEval[i].coeff = (GLfloat*) crAlloc(size);
     804                pEval[i].coeff = (GLfloat*) crAlloc((unsigned int /* this case is just so stupid */)size);
    805805                if (!pEval[i].coeff) return VERR_NO_MEMORY;
    806806            }
     
    14551455        }
    14561456    }
    1457 
    1458     return rc;
     1457    /* not reached*/
    14591458}
    14601459
     
    26502649
    26512650                datasize = crStateGetUniformSize(pProgram->pUniforms[k].type)*itemsize;
    2652                 pProgram->pUniforms[k].data = crAlloc(datasize);
     2651                pProgram->pUniforms[k].data = crAlloc((unsigned int /* this case is just so stupid */)datasize);
    26532652                if (!pProgram->pUniforms[k].data) return VERR_NO_MEMORY;
    26542653
  • trunk/src/VBox/GuestHost/OpenGL/state_tracker/state_stencil.c

    r44332 r62814  
    4242            return 0;
    4343    }
     44#ifndef VBOX /* unreachable */
    4445    crError("should never be here!");
    4546    return 0;
     47#endif
    4648}
    4749
  • trunk/src/VBox/GuestHost/OpenGL/util/blitter.cpp

    r62492 r62814  
    193193    }
    194194
    195     if (srcX >= pSrc->width)
     195    if ((GLuint)srcX >= pSrc->width)
    196196    {
    197197        WARN(("ups"));
     
    199199    }
    200200
    201     if (srcY >= pSrc->height)
     201    if ((GLuint)srcY >= pSrc->height)
    202202    {
    203203        WARN(("ups"));
     
    218218    int32_t UnscaledSrcHeight = UnscaledCopyRect.yBottom - UnscaledCopyRect.yTop;
    219219
    220     if (UnscaledSrcWidth + srcX > pSrc->width)
     220    if (UnscaledSrcWidth + srcX > (GLint)pSrc->width)
    221221        UnscaledSrcWidth = pSrc->width - srcX;
    222222
    223     if (UnscaledSrcHeight + srcY > pSrc->height)
     223    if (UnscaledSrcHeight + srcY > (GLint)pSrc->height)
    224224        UnscaledSrcHeight = pSrc->height - srcY;
    225225
  • trunk/src/VBox/GuestHost/OpenGL/util/error.c

    r62812 r62814  
    4343 * See also VBoxDeps.cpp in iprt and xpcom.
    4444 */
     45#ifdef _MSC_VER
     46# pragma warning(push)
     47# pragma warning(disable:4232) /* nonstandard extension used: 'g_VBoxRTDeps' : address of dllimport 'RTBldCfgRevision' is not static, identiy not guaranteed */
     48#endif
    4549PFNRT g_VBoxRTDeps[] =
    4650{
     
    5155    (PFNRT)RTBldCfgRevision,
    5256};
     57#ifdef _MSC_VER
     58# pragma warning(pop)
     59#endif
    5360
    5461
     
    171178BOOL WINAPI DllMain(HINSTANCE hDLLInst, DWORD fdwReason, LPVOID lpvReserved)
    172179{
    173     (void) lpvReserved;
     180    (void) lpvReserved; (void) hDLLInst;
    174181
    175182    switch (fdwReason)
  • trunk/src/VBox/GuestHost/OpenGL/util/hash.c

    r56566 r62814  
    572572{
    573573    GLuint res;
    574     int i;
    575574
    576575#ifdef CHROMIUM_THREADSAFE
     
    579578    res = crHashIdPoolAllocBlock (h->idPool, range);
    580579#ifdef DEBUG_misha
    581     Assert(res);
    582     for (i = 0; i < range; ++i)
    583     {
    584         void *search = crHashtableSearch( h, res+i );
    585         Assert(!search);
     580    {
     581        int i;
     582        Assert(res);
     583        for (i = 0; i < range; ++i)
     584        {
     585            void *search = crHashtableSearch( h, res+i );
     586            Assert(!search);
     587        }
    586588    }
    587589#endif
  • trunk/src/VBox/GuestHost/OpenGL/util/htable.cpp

    r62492 r62814  
    11/* $Id$ */
    2 
    32/** @file
    43 * uint32_t handle to void simple table impl
     4 *
     5 * @todo Why couldn't you simply use iprt/handletable.h?
    56 */
    67
     
    1617 * hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
    1718 */
     19
    1820#include <iprt/cdefs.h>
    1921#include <iprt/asm.h>
     
    162164        }
    163165    }
    164     WARN(("should not be here"));
    165     return CRHTABLE_HANDLE_INVALID;
     166    /* not reached */
    166167}
    167168
  • trunk/src/VBox/GuestHost/OpenGL/util/list.c

    r61991 r62814  
    33#include "cr_mem.h"
    44
     5#ifndef CR_TESTING_LIST                 /* vbox */
     6# define CR_TESTING_LIST 0              /* vbox */
     7#endif                                  /* vbox */
    58#if CR_TESTING_LIST
    69#include <stdio.h>
  • trunk/src/VBox/GuestHost/OpenGL/util/mem.c

    r57542 r62814  
    6464        return _crAlloc(nbytes);
    6565#else
     66        RT_NOREF2(file, line);
    6667        return crAlloc(nbytes);
    6768#endif
     
    9495        return _crCalloc(nbytes);
    9596#else
     97        RT_NOREF2(file, line);
    9698        return crCalloc(nbytes);
    9799#endif
  • trunk/src/VBox/GuestHost/OpenGL/util/pixel.c

    r62809 r62814  
    18571857{
    18581858    va_list va;
    1859     int rc;
    18601859    va_start(va, fname);
    18611860    crDumpNamedTGAV(w, h, data, fname, va);
  • trunk/src/VBox/GuestHost/OpenGL/util/tcpip.c

    r61992 r62814  
    77#ifdef WINDOWS
    88#define WIN32_LEAN_AND_MEAN
     9# ifdef VBOX
     10#  include <iprt/win/winsock2.h>
     11# else /* !VBOX */
    912#pragma warning( push, 3 )
    1013#include <winsock2.h>
     
    1215#pragma warning( disable : 4514 )
    1316#pragma warning( disable : 4127 )
    14 # ifndef VBOX
    1517typedef int ssize_t;
    16 # endif
     18# endif /* !VBOX */
    1719#else
    1820#include <sys/types.h>
     
    6062
    6163#ifdef WINDOWS
     64# undef EADDRINUSE
    6265#define EADDRINUSE   WSAEADDRINUSE
     66# undef ECONNREFUSED
    6367#define ECONNREFUSED WSAECONNREFUSED
    6468#endif
  • trunk/src/VBox/GuestHost/OpenGL/util/threads.c

    r55011 r62814  
    250250{
    251251    /* XXX anything to do? */
     252    (void)b;
    252253}
    253254
     
    258259    DWORD dwEvent
    259260        = WaitForMultipleObjects( b->count, b->hEvents, FALSE, INFINITE );
     261    (void)dwEvent;
    260262#else
    261263    pthread_mutex_lock( &(b->mutex) );
     
    276278{
    277279#ifdef WINDOWS
     280    (void) s; (void) count;
    278281    crWarning("CRsemaphore functions not implemented on Windows");
    279282#else
     
    287290#ifdef WINDOWS
    288291    /* to do */
     292    (void) s;
    289293#else
    290294    sem_wait(s);
     
    297301#ifdef WINDOWS
    298302    /* to do */
     303    (void) s;
    299304#else
    300305    sem_post(s);
  • trunk/src/VBox/GuestHost/OpenGL/util/vboxhgcm.c

    r62812 r62814  
    14661466            return RT_SUCCESS(rc);
    14671467        }
    1468         else
    1469         {
    1470             crDebug("HGCM connect failed with rc=0x%x\n", info.result);
    1471 
    1472             VBOXCRHGSMIPROFILE_FUNC_EPILOGUE();
    1473             return FALSE;
    1474         }
    1475     }
    1476     else
    1477     {
     1468        crDebug("HGCM connect failed with rc=0x%x\n", info.result);
     1469
     1470        VBOXCRHGSMIPROFILE_FUNC_EPILOGUE();
     1471        return FALSE;
     1472    }
    14781473#ifdef RT_OS_WINDOWS
     1474    {
    14791475        DWORD winEr = GetLastError();
    14801476        crDebug("IOCTL for HGCM connect failed with rc=0x%x\n", winEr);
     1477    }
    14811478#else
    1482         crDebug("IOCTL for HGCM connect failed with rc=0x%x\n", errno);
    1483 #endif
    1484         VBOXCRHGSMIPROFILE_FUNC_EPILOGUE();
    1485         return FALSE;
    1486     }
    1487 
     1479    crDebug("IOCTL for HGCM connect failed with rc=0x%x\n", errno);
     1480#endif
    14881481    VBOXCRHGSMIPROFILE_FUNC_EPILOGUE();
    14891482    return FALSE;
     
    20142007{
    20152008    int rc;
    2016     int32_t callRes;
     2009    int32_t callRes = VINF_SUCCESS; /* Shut up MSC. */
    20172010    VBOXUHGSMI_BUFFER_SUBMIT aSubmit[2];
    20182011
  • trunk/src/VBox/GuestHost/OpenGL/util/vreg.cpp

    r62683 r62814  
    730730}
    731731
     732#if 0 /* unused */
    732733static DECLCALLBACK(PRTLISTNODE) vboxVrListIntersectNoJoinIntersectedCb(PVBOXVR_LIST pList1, PVBOXVR_REG pReg1, PCRTRECT pRect2,
    733734                                                                        void *pvContext, PPRTLISTNODE ppNext)
    734735{
     736    RT_NOREF1(ppNext);
    735737    PVBOXVR_CBDATA_SUBST pData = (PVBOXVR_CBDATA_SUBST)pvContext;
    736738    pData->fChanged = true;
     
    753755    return &pReg1->ListEntry;
    754756}
     757#endif
    755758
    756759static int vboxVrListIntersectNoJoin(PVBOXVR_LIST pList, PCVBOXVR_LIST pList2, bool *pfChanged)
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