VirtualBox

Changeset 26296 in vbox for trunk/src/VBox


Ignore:
Timestamp:
Feb 5, 2010 2:53:35 PM (15 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
57365
Message:

more warnings.

Location:
trunk/src/VBox
Files:
19 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Devices/Network/DevPCNet.cpp

    r26173 r26296  
    28262826            }
    28272827        case 15: /* Mode */
    2828             if ((pThis->aCSR[15] & 0x8000) != (val & 0x8000) && pThis->pDrv)
     2828            if ((pThis->aCSR[15] & 0x8000) != (uint16_t)(val & 0x8000) && pThis->pDrv)
    28292829            {
    28302830                Log(("#%d: promiscuous mode changed to %d\n", PCNET_INST_NR, !!(val & 0x8000)));
  • trunk/src/VBox/Devices/Network/testcase/tstIntNetR0.cpp

    r17091 r26296  
    560560                            if (!g_cErrors)
    561561                            {
    562                                 ARGS Args0 = {0};
     562                                ARGS Args0;
     563                                RT_ZERO(Args0);
    563564                                Args0.hIf = hIf0;
    564565                                Args0.pBuf = pBuf0;
     
    568569                                Args0.Mac.au16[2] = 0;
    569570
    570                                 ARGS Args1 = {0};
     571                                ARGS Args1;
     572                                RT_ZERO(Args1);
    571573                                Args1.hIf = hIf1;
    572574                                Args1.pBuf = pBuf1;
  • trunk/src/VBox/Devices/Storage/testcase/vditool.cpp

    r21405 r26296  
    112112        return PrintDone(rc);
    113113
    114     PDMMEDIAGEOMETRY geo = { 0 }; /* auto-detect */
     114    PDMMEDIAGEOMETRY geo = { 0, 0, 0 }; /* auto-detect */
    115115    rc = VDCreateBase(hdd, "vdi", pszUtf8Filename,
    116116                      (uint64_t)cMBs * _1M,
  • trunk/src/VBox/Disassembler/DisasmTest.cpp

    r17629 r26296  
    4646    else
    4747    {
    48         RTUINTPTR pInstr = (RTUINTPTR)TestProc;
     48        RTUINTPTR pInstr = (uintptr_t)TestProc;
    4949
    5050        for (int i=0;i<50;i++)
     
    7070#ifndef RT_OS_OS2
    7171        printf("\n64 bits disassembly\n");
    72         pInstr = (RTUINTPTR)TestProc64;
     72        pInstr = (uintptr_t)TestProc64;
    7373
    7474////__debugbreak();
  • trunk/src/VBox/Disassembler/DisasmTestCore.cpp

    r8155 r26296  
    4444        DISCPUSTATE cpu;
    4545        cpu.mode = CPUMODE_32BIT;
    46         if (DISCoreOne(&cpu, (RTUINTPTR)&DISCoreOne, &cb))
     46        if (DISCoreOne(&cpu, (uintptr_t)&DISCoreOne, &cb))
    4747            printf("ok %d\n", cpu.addrmode);
    4848        else
  • trunk/src/VBox/Frontends/VirtualBox/src/extensions/QIWizard.cpp

    r26187 r26296  
    4747
    4848    /* Calculating nearest 'golden ratio' width. */
    49     int iGoldRatioWidth = sqrt(1.61 * width() * height());
     49    int iGoldRatioWidth = (int)sqrt(1.61 * width() * height());
    5050    int iNewLabelWidth = iGoldRatioWidth - iLabelDelta;
    5151    resizeAccordingLabelWidth(iNewLabelWidth);
  • trunk/src/VBox/HostServices/SharedClipboard/x11-clipboard.cpp

    r26163 r26296  
    5353     * the backend is responsible for ensuring that this does not happen. */
    5454    VBOXCLIPBOARDREQFROMVBOX *pReq;
    55    
     55
    5656    /** Pointer to the opaque X11 backend structure */
    5757    CLIPBACKEND *pBackend;
     
    222222 *         freed in ClipCompleteDataRequestFromX11 when it is called back from
    223223 *         the backend code.
    224  *         
     224 *
    225225 */
    226226int vboxClipboardReadData (VBOXCLIPBOARDCLIENTDATA *pClient,
     
    230230    LogRelFlowFunc(("pClient=%p, u32Format=%02X, pv=%p, cb=%u, pcbActual=%p",
    231231                 pClient, u32Format, pv, cb, pcbActual));
    232    
     232
    233233    int rc = VINF_SUCCESS;
    234234    CLIPREADCBREQ *pReq = (CLIPREADCBREQ *) RTMemAlloc(sizeof(CLIPREADCBREQ));
     
    357357                                   uint32_t *pcb)
    358358{
    359     VBOXCLIPBOARDREQFROMVBOX request = { NULL };
     359    VBOXCLIPBOARDREQFROMVBOX request = { NULL, 0, 0, NIL_RTSEMEVENT };
    360360
    361361    LogRelFlowFunc(("pCtx=%p, u32Format=%02X, ppv=%p, pcb=%p\n", pCtx,
     
    413413                pReq->cb = cb;
    414414                pReq->format = u32Format;
    415             }           
     415            }
    416416        }
    417417        /* Signal that the request has been completed. */
  • trunk/src/VBox/Main/MediumImpl.cpp

    r26236 r26296  
    49494949            if (FAILED(rc)) throw rc;
    49504950
    4951             PDMMEDIAGEOMETRY geo = { 0 }; /* auto-detect */
     4951            PDMMEDIAGEOMETRY geo = { 0, 0, 0 }; /* auto-detect */
    49524952
    49534953            vrc = VDCreateBase(hdd,
     
    55015501    ComObjPtr<Medium> &pParent = task.d.parentDisk;
    55025502
    5503     bool fCreatingTarget;
     5503    bool fCreatingTarget; /** @todo warning: 'fCreatingTarget' might be used uninitialized in this function */
    55045504
    55055505    uint64_t size = 0, logicalSize = 0;
  • trunk/src/VBox/Main/include/AutoStateDep.h

    r26088 r26296  
    164164
    165165#endif // ____H_AUTOSTATEDEP
     166
  • trunk/src/VBox/Main/linux/HostHardwareLinux.cpp

    r26186 r26296  
    325325    AssertPtrNullReturn(pchModel, VERR_INVALID_POINTER);
    326326
    327     unsigned char u8Response[96] = { 0 };
    328     struct cdrom_generic_command CdromCommandReq =
    329     { { INQUIRY, 0, 0, 0, sizeof(u8Response), 0 }  /* INQUIRY */ };
    330     int rc, rcIoCtl = 0;
    331     RTFILE file;
    332     rc = RTFileOpen(&file, pcszNode, RTFILE_O_READ | RTFILE_O_OPEN | RTFILE_O_DENY_NONE | RTFILE_O_NON_BLOCK);
     327    RTFILE hFile;
     328    int rc = RTFileOpen(&hFile, pcszNode, RTFILE_O_READ | RTFILE_O_OPEN | RTFILE_O_DENY_NONE | RTFILE_O_NON_BLOCK);
    333329    if (RT_SUCCESS(rc))
    334330    {
    335         CdromCommandReq.buffer = u8Response;
    336         CdromCommandReq.buflen = sizeof(u8Response);
     331        int                             rcIoCtl        = 0;
     332        unsigned char                   u8Response[96] = { 0 };
     333        struct cdrom_generic_command    CdromCommandReq;
     334        RT_ZERO(CdromCommandReq);
     335        CdromCommandReq.cmd[0]         = INQUIRY;
     336        CdromCommandReq.cmd[4]         = sizeof(u8Response);
     337        CdromCommandReq.buffer         = u8Response;
     338        CdromCommandReq.buflen         = sizeof(u8Response);
    337339        CdromCommandReq.data_direction = CGC_DATA_READ;
    338         CdromCommandReq.timeout = 5000;  /* ms */
    339         rc = RTFileIoCtl(file, CDROM_SEND_PACKET, &CdromCommandReq, 0,
    340                          &rcIoCtl);
     340        CdromCommandReq.timeout        = 5000;  /* ms */
     341        rc = RTFileIoCtl(hFile, CDROM_SEND_PACKET, &CdromCommandReq, 0, &rcIoCtl);
    341342        if (RT_SUCCESS(rc) && rcIoCtl < 0)
    342343            rc = RTErrConvertFromErrno(-CdromCommandReq.stat);
    343         RTFileClose(file);
    344     }
    345     if (RT_SUCCESS(rc))
    346     {
    347         if (pu8Type)
    348             *pu8Type = u8Response[0] & 0x1f;
    349         if (pchVendor)
    350             RTStrPrintf(pchVendor, cchVendor, "%.8s",
    351                         (char *) &u8Response[8] /* vendor id string */);
    352         if (pchModel)
    353             RTStrPrintf(pchModel, cchModel, "%.16s",
    354                         (char *) &u8Response[16] /* product id string */);
     344        RTFileClose(hFile);
     345
     346        if (RT_SUCCESS(rc))
     347        {
     348            if (pu8Type)
     349                *pu8Type = u8Response[0] & 0x1f;
     350            if (pchVendor)
     351                RTStrPrintf(pchVendor, cchVendor, "%.8s",
     352                            &u8Response[8] /* vendor id string */);
     353            if (pchModel)
     354                RTStrPrintf(pchModel, cchModel, "%.16s",
     355                            &u8Response[16] /* product id string */);
     356            LogRelFlowFunc(("returning success: type=%u, vendor=%.8s, product=%.16s\n",
     357                            u8Response[0] & 0x1f, &u8Response[8], &u8Response[16]));
     358            return VINF_SUCCESS;
     359        }
    355360    }
    356361    LogRelFlowFunc(("returning %Rrc\n", rc));
    357     if (RT_SUCCESS(rc))
    358         LogRelFlowFunc(("    type=%u, vendor=%.8s, product=%.16s\n",
    359                         u8Response[0] & 0x1f, (char *) &u8Response[8],
    360                         (char *) &u8Response[16]));
    361362    return rc;
    362363}
     
    801802                  pList, (unsigned) isDVD, pfSuccess));
    802803    PRTDIR pDir = NULL;
    803     RTDIRENTRY entry = {0};
    804804    int rc;
    805805    bool fSuccess = false;
     
    813813    fSuccess = true;
    814814    if (RT_SUCCESS(rc))
    815         while (true)
    816         {
     815        for (;;)
     816        {
     817            RTDIRENTRY entry;
    817818            rc = RTDirRead(pDir, &entry, NULL);
    818819            Assert(rc != VERR_BUFFER_OVERFLOW);  /* Should never happen... */
     
    989990    bool success = false;
    990991
    991     deviceNodeArray aDevices = { { 0 } };
    992992    char szPath[RTPATH_MAX] = "/dev";
     993    deviceNodeArray aDevices;
     994    RT_ZERO(aDevices);
    993995    devFindDeviceRecursive(szPath, sizeof(szPath), aDevices, isDVD);
    994996    try
  • trunk/src/VBox/Main/xml/Settings.cpp

    r26156 r26296  
    394394               )
    395395            {
    396                 RTTIME time = { yyyy,
    397                                 (uint8_t)mm,
    398                                 0,
    399                                 0,
    400                                 (uint8_t)dd,
    401                                 (uint8_t)hh,
    402                                 (uint8_t)min,
    403                                 (uint8_t)secs,
    404                                 0,
    405                                 RTTIME_FLAGS_TYPE_UTC };
     396                RTTIME time =
     397                {
     398                    yyyy,
     399                    (uint8_t)mm,
     400                    0,
     401                    0,
     402                    (uint8_t)dd,
     403                    (uint8_t)hh,
     404                    (uint8_t)min,
     405                    (uint8_t)secs,
     406                    0,
     407                    RTTIME_FLAGS_TYPE_UTC,
     408                    0
     409                };
    406410                if (RTTimeNormalize(&time))
    407411                    if (RTTimeImplode(&timestamp, &time))
  • trunk/src/VBox/Runtime/testcase/tstLdr-2.cpp

    r16933 r26296  
    126126                        memset(&Cpu, 0, sizeof(Cpu));
    127127                        Cpu.mode = CPUMODE_32BIT;
    128                         if (MyDisBlock(&Cpu, (RTUINTPTR)pvBits + off, 200, Addr - (uintptr_t)pvBits))
     128                        if (MyDisBlock(&Cpu, (uintptr_t)pvBits + off, 200, Addr - (uintptr_t)pvBits))
    129129                        {
    130130                            RTUINTPTR Addr2 = 0xd0000000;
     
    132132                            if (RT_SUCCESS(rc))
    133133                            {
    134                                 if (MyDisBlock(&Cpu, (RTUINTPTR)pvBits + off, 200, Addr2 - (uintptr_t)pvBits))
     134                                if (MyDisBlock(&Cpu, (uintptr_t)pvBits + off, 200, Addr2 - (uintptr_t)pvBits))
    135135                                    rcRet = 0;
    136136                                else
  • trunk/src/VBox/Runtime/testcase/tstLdr-3.cpp

    r18357 r26296  
    199199            for (int i = 3; i < argc; i++)
    200200            {
    201                 TESTNEARSYM NearSym = {0};
     201                TESTNEARSYM NearSym;
     202                RT_ZERO(NearSym);
    202203                NearSym.Addr = (RTUINTPTR)RTStrToUInt64(argv[i]);
    203204                NearSym.aSyms[1].Value = ~(RTUINTPTR)0;
  • trunk/src/VBox/Runtime/testcase/tstRTAvl.cpp

    r20606 r26296  
    841841        AVLROGCPHYSTREE     Tree;
    842842        AVLROGCPHYSNODECORE aNode[4];
    843     } s1 = {0}, s2 = {0}, s3 = {0};
     843    }   s1, s2, s3;
     844    RT_ZERO(s1);
     845    RT_ZERO(s2);
     846    RT_ZERO(s3);
    844847
    845848    s1.aNode[0].Key        = 0x00030000;
  • trunk/src/VBox/VMM/PATM/VMMAll/PATMAll.cpp

    r26271 r26296  
    391391            ||  (pRegFrame->cs & X86_SEL_RPL) != 3
    392392            ||  pVM->patm.s.pfnSysEnterPatchGC == 0
    393             ||  pVM->patm.s.pfnSysEnterGC != (RTRCPTR)pCtx->SysEnter.eip
     393            ||  pVM->patm.s.pfnSysEnterGC != (RTRCPTR)(RTRCUINTPTR)pCtx->SysEnter.eip
    394394            ||  !(PATMRawGetEFlags(pVM, pRegFrame) & X86_EFL_IF))
    395395            goto end;
  • trunk/src/VBox/VMM/PATM/VMMGC/CSAMGC.cpp

    r26271 r26296  
    9191        rc = PGMShwModifyPage(pVCpu, pvFault, 1, X86_PTE_RW, ~(uint64_t)X86_PTE_RW);
    9292        AssertMsgRC(rc, ("PGMShwModifyPage -> rc=%Rrc\n", rc));
    93         ASMInvalidatePage((void *)pvFault);
     93        ASMInvalidatePage((void *)(uintptr_t)pvFault);
    9494        return VINF_SUCCESS;
    9595    }
     
    121121
    122122    /* Note that pvFault might be a different address in case of aliases. So use pvRange + offset instead!. */
    123     pVM->csam.s.pvDirtyBasePage[pVM->csam.s.cDirtyPages] = (RTRCPTR)((RTGCUINTPTR)pvRange + offRange);
    124     pVM->csam.s.pvDirtyFaultPage[pVM->csam.s.cDirtyPages] = (RTRCPTR)((RTGCUINTPTR)pvRange + offRange);
     123    pVM->csam.s.pvDirtyBasePage[pVM->csam.s.cDirtyPages] = (RTRCPTR)((RTRCUINTPTR)pvRange + offRange);
     124    pVM->csam.s.pvDirtyFaultPage[pVM->csam.s.cDirtyPages] = (RTRCPTR)((RTRCUINTPTR)pvRange + offRange);
    125125    if (++pVM->csam.s.cDirtyPages == CSAM_MAX_DIRTY_PAGES)
    126126        return VINF_CSAM_PENDING_ACTION;
     
    132132    rc = PGMShwModifyPage(pVCpu, pvFault, 1, X86_PTE_RW, ~(uint64_t)X86_PTE_RW);
    133133    AssertMsgRC(rc, ("PGMShwModifyPage -> rc=%Rrc\n", rc));
    134     ASMInvalidatePage((void *)pvFault);
     134    ASMInvalidatePage((void *)(uintptr_t)pvFault);
    135135
    136136    STAM_COUNTER_INC(&pVM->csam.s.StatCodePageModified);
  • trunk/src/VBox/VMM/PATM/VMMGC/PATMGC.cpp

    r26271 r26296  
    6363VMMRCDECL(int) PATMGCMonitorPage(PVM pVM, RTGCUINT uErrorCode, PCPUMCTXCORE pRegFrame, RTGCPTR pvFault, RTGCPTR pvRange, uintptr_t offRange)
    6464{
    65     pVM->patm.s.pvFaultMonitor = (RTRCPTR)pvFault;
     65    pVM->patm.s.pvFaultMonitor = (RTRCPTR)(RTRCUINTPTR)pvFault;
    6666    return VINF_PATM_CHECK_PATCH_PAGE;
    6767}
     
    9292    STAM_PROFILE_ADV_START(&pVM->patm.s.StatPatchWriteDetect, a);
    9393
    94     pWritePageStart = (RTGCUINTPTR)GCPtr & PAGE_BASE_GC_MASK;
    95     pWritePageEnd   = ((RTGCUINTPTR)GCPtr + cbWrite - 1) & PAGE_BASE_GC_MASK;
     94    pWritePageStart = (RTRCUINTPTR)GCPtr & PAGE_BASE_GC_MASK;
     95    pWritePageEnd   = ((RTRCUINTPTR)GCPtr + cbWrite - 1) & PAGE_BASE_GC_MASK;
    9696
    9797    pPatchPage = (PPATMPATCHPAGE)RTAvloU32Get(CTXSUFF(&pVM->patm.s.PatchLookupTree)->PatchTreeByPage, (AVLOU32KEY)pWritePageStart);
     
    110110    if (pPatchPage)
    111111    {
    112         if (    pPatchPage->pLowestAddrGC  > (RTRCPTR)((RTGCUINTPTR)GCPtr + cbWrite - 1)
     112        if (    pPatchPage->pLowestAddrGC  > (RTRCPTR)((RTRCUINTPTR)GCPtr + cbWrite - 1)
    113113            ||  pPatchPage->pHighestAddrGC < (RTRCPTR)GCPtr)
    114114        {
     
    516516                return VINF_EM_RAW_EMULATE_INSTR;
    517517            }
    518             rc = DISCoreOne(&cpu, (RTUINTPTR)&pRec->patch.aPrivInstr[0], &cbOp);
     518            rc = DISCoreOne(&cpu, (uintptr_t)&pRec->patch.aPrivInstr[0], &cbOp);
    519519            if (RT_FAILURE(rc))
    520520            {
  • trunk/src/VBox/VMM/VMMR0/HWVMXR0.cpp

    r26180 r26296  
    22622262    int         rc = VINF_SUCCESS;
    22632263    RTGCUINTREG val;
    2264     RTGCUINTREG exitReason = VMX_EXIT_INVALID;
     2264    RTGCUINTREG exitReason = (RTGCUINTREG)VMX_EXIT_INVALID;
    22652265    RTGCUINTREG instrError, cbInstr;
    22662266    RTGCUINTPTR exitQualification = 0;
  • trunk/src/VBox/VMM/testcase/tstCompiler.cpp

    r8155 r26296  
    201201{
    202202    RTPrintf("tstBitFields: Disassembly of %s:\n", pszName);
    203     RTUINTPTR uCur = (RTUINTPTR)pv;
     203    RTUINTPTR uCur = (uintptr_t)pv;
    204204    RTUINTPTR uCurMax = uCur + 256;
    205205    DISCPUSTATE Cpu;
     
    218218        else
    219219        {
    220             RTPrintf("tstBitFields: %p: %02x - DISInstr failed!\n", uCur, *(uint8_t *)uCur);
     220            RTPrintf("tstBitFields: %p: %02x - DISInstr failed!\n", uCur, *(uint8_t *)(uintptr_t)uCur);
    221221            uCur += 1;
    222222        }
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