VirtualBox

Ignore:
Timestamp:
Aug 9, 2016 11:40:19 AM (9 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
109822
Message:

GuestHost/OpenGL: warnings (gcc).

Location:
trunk/src/VBox/GuestHost/OpenGL/util
Files:
17 edited

Legend:

Unmodified
Added
Removed
  • 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.

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