Changeset 84386 in vbox for trunk/src/VBox
- Timestamp:
- May 20, 2020 5:44:15 AM (5 years ago)
- svn:sync-xref-src-repo-rev:
- 138082
- Location:
- trunk/src/VBox/Devices
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Devices/Network/DevVirtioNet_1_0.cpp
r84384 r84386 676 676 } 677 677 678 678 #ifdef LOG_ENABLED 679 679 DECLINLINE(void) virtioNetPrintFeatures(VIRTIONET *pThis) 680 680 { 681 #ifdef LOG_ENABLED682 681 static struct 683 682 { … … 727 726 "%s\n", pszBuf)); 728 727 RTMemFree(pszBuf); 729 730 #else /* !LOG_ENABLED */ 731 RT_NOREF(pThis); 732 #endif /* !LOG_ENABLED */ 733 } 734 728 } 729 #endif 735 730 /* 736 731 * Checks whether negotiated features have required flag combinations. … … 1545 1540 VERR_INTERNAL_ERROR); 1546 1541 1547 uint32_t cbDescChainLeft = pDescChain->cbPhysReturn;1542 size_t cbDescChainLeft = pDescChain->cbPhysReturn; 1548 1543 uint8_t cbHdr = sizeof(VIRTIONET_PKT_HDR_T); 1549 1544 … … 1744 1739 if (!uFeatures) 1745 1740 { 1746 Log2Func((" GSO type (0x%x) not supported\n", INSTANCE(pThis), pGso->u8Type));1741 Log2Func(("%s GSO type (0x%x) not supported\n", INSTANCE(pThis), pGso->u8Type)); 1747 1742 return VERR_NOT_SUPPORTED; 1748 1743 } … … 1789 1784 1790 1785 /* Read physical bytes from the out segment(s) of descriptor chain */ 1791 static void virtioNetR3PullChain(PPDMDEVINS pDevIns, PVIRTIONET pThis, PVIRTIO_DESC_CHAIN_T pDescChain, void *pv, uint16_t cb)1786 static void virtioNetR3PullChain(PPDMDEVINS pDevIns, PVIRTIONET pThis, PVIRTIO_DESC_CHAIN_T pDescChain, void *pv, size_t cb) 1792 1787 { 1793 1788 uint8_t *pb = (uint8_t *)pv; … … 1835 1830 1836 1831 uint8_t fOn, fPromiscChanged = false; 1837 virtioNetR3PullChain(pDevIns, pThis, pDescChain, &fOn, RT_MIN(pDescChain->cbPhysSend, sizeof(fOn)));1832 virtioNetR3PullChain(pDevIns, pThis, pDescChain, &fOn, (size_t)RT_MIN(pDescChain->cbPhysSend, sizeof(fOn))); 1838 1833 1839 1834 switch(pCtrlPktHdr->uCmd) … … 2845 2840 Log7Func(("PDM device instance: %d\n", iInstance)); 2846 2841 2847 RTStrPrintf(pThis->szInstanceName, sizeof(pThis->szInstanceName), "VIRTIONET ", iInstance);2842 RTStrPrintf(pThis->szInstanceName, sizeof(pThis->szInstanceName), "VIRTIONET%d", iInstance); 2848 2843 2849 2844 pThisCC->pDevIns = pDevIns; -
trunk/src/VBox/Devices/Storage/DevVirtioSCSI.cpp
r84358 r84386 1215 1215 uint32_t const offDataOut = sizeof(REQ_CMD_HDR_T) + cbCdb; 1216 1216 uint32_t const offDataIn = sizeof(REQ_RESP_HDR_T) + cbSenseCfg; 1217 uint32_tconst cbDataOut = pDescChain->cbPhysSend - offDataOut;1217 size_t const cbDataOut = pDescChain->cbPhysSend - offDataOut; 1218 1218 /** @todo r=bird: Validate cbPhysReturn properly? I've just RT_MAX'ed it for now. */ 1219 1219 uint32_t const cbDataIn = RT_MAX(pDescChain->cbPhysReturn, offDataIn) - offDataIn;
Note:
See TracChangeset
for help on using the changeset viewer.