VirtualBox

Changeset 62708 in vbox for trunk/src/VBox/HostDrivers


Ignore:
Timestamp:
Jul 29, 2016 8:38:18 PM (8 years ago)
Author:
vboxsync
Message:

HostDrivers: warnings

Location:
trunk/src/VBox/HostDrivers/VBoxNetFlt
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/HostDrivers/VBoxNetFlt/VBoxNetFlt.c

    r62490 r62708  
    13341334 * @param   pszInterfaceUuid    The factory interface id.
    13351335 */
    1336 static DECLCALLBACK(void *) vboxNetFltQueryFactoryInterface(PCSUPDRVFACTORY pSupDrvFactory, PSUPDRVSESSION pSession, const char *pszInterfaceUuid)
     1336static DECLCALLBACK(void *) vboxNetFltQueryFactoryInterface(PCSUPDRVFACTORY pSupDrvFactory, PSUPDRVSESSION pSession,
     1337                                                            const char *pszInterfaceUuid)
    13371338{
    13381339    PVBOXNETFLTGLOBALS pGlobals = (PVBOXNETFLTGLOBALS)((uint8_t *)pSupDrvFactory - RT_OFFSETOF(VBOXNETFLTGLOBALS, SupDrvFactory));
     
    13621363        Log(("VBoxNetFlt: rc=%Rrc, uuid=%s\n", rc, pszInterfaceUuid));
    13631364
     1365    RT_NOREF1(pSession);
    13641366    return NULL;
    13651367}
  • trunk/src/VBox/HostDrivers/VBoxNetFlt/win/drv/VBoxNetFltP-win.cpp

    r62490 r62708  
    113113{
    114114    LogFlowFuncEnter();
     115    RT_NOREF2(hBindContext, pvSystemSpecific2);
    115116
    116117    NDIS_STATUS Status;
     
    142143static VOID vboxNetFltWinPtOpenAdapterComplete(IN NDIS_HANDLE hProtocolBindingContext, IN NDIS_STATUS Status, IN NDIS_STATUS OpenErrorStatus)
    143144{
    144     PVBOXNETFLTINS pNetFlt =(PVBOXNETFLTINS)hProtocolBindingContext;
     145    PVBOXNETFLTINS pNetFlt = (PVBOXNETFLTINS)hProtocolBindingContext;
     146    RT_NOREF1(OpenErrorStatus);
    145147
    146148    LogFlowFunc(("ENTER: pNetFlt (0x%p), Status (0x%x), OpenErrorStatus(0x%x)\n", pNetFlt, Status, OpenErrorStatus));
     
    254256{
    255257    PVBOXNETFLTINS pNetFlt = (PVBOXNETFLTINS)hContext;
     258    RT_NOREF1(hUnbindContext);
    256259
    257260    LogFlowFunc(("ENTER: pNetFlt (0x%p)\n", pNetFlt));
     
    267270    LogFlowFuncEnter();
    268271    NDIS_STATUS Status = vboxNetFltWinPtDeregister(&g_VBoxNetFltGlobalsWin.Pt);
    269     Assert(Status == NDIS_STATUS_SUCCESS);
     272    Assert(Status == NDIS_STATUS_SUCCESS); NOREF(Status);
    270273    LogFlowFunc(("LEAVE: PtDeregister Status (0x%x)\n", Status));
    271274}
     
    290293static VOID vboxNetFltWinPtResetComplete(IN NDIS_HANDLE hProtocolBindingContext, IN NDIS_STATUS Status)
    291294{
     295    RT_NOREF2(hProtocolBindingContext, Status);
    292296    LogFlowFunc(("ENTER: pNetFlt 0x%p, Status 0x%x\n", hProtocolBindingContext, Status));
    293297    /*
    294298     * should never be here
    295299     */
    296     Assert(0);
     300    AssertFailed();
    297301    LogFlowFunc(("LEAVE: pNetFlt 0x%p, Status 0x%x\n", hProtocolBindingContext, Status));
    298302}
     
    484488    PVBOXNETFLTINS pNetFlt = (PVBOXNETFLTINS)hContext;
    485489    PNDIS_REQUEST pSynchRequest = pNetFlt->u.s.WinIf.pSynchRequest;
    486     NDIS_OID Oid = pNetFlt->u.s.WinIf.PassDownRequest.DATA.SET_INFORMATION.Oid;
    487490
    488491    LogFlowFunc(("ENTER: pNetFlt (0x%p), pNdisRequest (0x%p), Status (0x%x)\n", pNetFlt, pNdisRequest, Status));
     
    763766}
    764767
    765 static INT vboxNetFltWinRecvPacketPassThru(PVBOXNETFLTINS pNetFlt, PNDIS_PACKET pPacket, BOOLEAN bForceIndicate)
     768static INT vboxNetFltWinRecvPacketPassThru(PVBOXNETFLTINS pNetFlt, PNDIS_PACKET pPacket)
    766769{
    767770    Assert(KeGetCurrentIrql() == DISPATCH_LEVEL);
     
    12241227{
    12251228    PVBOXNETFLTINS pNetFlt = (PVBOXNETFLTINS)hProtocolBindingContext;
    1226     ULONG cPackets = 0;
    1227     bool bNetFltActive;
    1228     bool fWinIfActive = vboxNetFltWinReferenceWinIfNetFlt(pNetFlt, &bNetFltActive);
     1229    bool fNetFltActive;
     1230    bool fWinIfActive = vboxNetFltWinReferenceWinIfNetFlt(pNetFlt, &fNetFltActive);
    12291231    NDIS_HANDLE hMiniport = pNetFlt->u.s.WinIf.hMiniport;
    12301232    /* Note: we're using KeGetCurrentProcessorNumber, which is not entirely correct in case
     
    12551257    if (fWinIfActive)
    12561258    {
    1257         if (bNetFltActive)
    1258         {
     1259        if (fNetFltActive)
    12591260            vboxNetFltWinDereferenceNetFlt(pNetFlt);
    1260         }
    12611261        else
    1262         {
    12631262            vboxNetFltWinDereferenceModePassThru(pNetFlt);
    1264         }
    12651263        vboxNetFltWinDereferenceWinIf(pNetFlt);
    12661264    }
     
    13081306                    NDIS_STATUS fStatus;
    13091307#endif
    1310                     bool bResources = NDIS_GET_PACKET_STATUS(pPacket) == NDIS_STATUS_RESOURCES;
     1308                    bool fResources = NDIS_GET_PACKET_STATUS(pPacket) == NDIS_STATUS_RESOURCES; NOREF(fResources);
    13111309
    13121310                    VBOXNETFLT_LBVERIFY(pNetFlt, pPacket);
     
    13151313                     * this is a temporary assert for debugging purposes:
    13161314                     * we're probably doing something wrong with the packets if the miniport reports NDIS_STATUS_RESOURCES */
    1317                     Assert(!bResources);
     1315                    Assert(!fResources);
    13181316#endif
    13191317
     
    13271325
    13281326#else
    1329                     fStatus = vboxNetFltWinQuEnqueuePacket(pNetFlt, pPacket, bResources ? PACKET_COPY : 0);
     1327                    fStatus = vboxNetFltWinQuEnqueuePacket(pNetFlt, pPacket, fResources ? PACKET_COPY : 0);
    13301328                    if (fStatus == NDIS_STATUS_SUCCESS)
    13311329                    {
    13321330                        bNetFltActive = false;
    13331331                        fWinIfActive = false;
    1334                         if (bResources)
     1332                        if (fResources)
    13351333                        {
    13361334                            cRefCount = 0;
     
    13381336                        }
    13391337                        else
    1340                         {
    13411338                            cRefCount = 1;
    1342                         }
    13431339                        break;
    13441340                    }
     
    13621358            }
    13631359
    1364             cRefCount = vboxNetFltWinRecvPacketPassThru(pNetFlt, pPacket, bNetFltActive);
     1360            cRefCount = vboxNetFltWinRecvPacketPassThru(pNetFlt, pPacket);
    13651361            if (cRefCount)
    13661362            {
     
    15191515 * register the protocol edge
    15201516 */
    1521 DECLHIDDEN(NDIS_STATUS) vboxNetFltWinPtRegister(PVBOXNETFLTGLOBALS_PT pGlobalsPt, PDRIVER_OBJECT pDriverObject, PUNICODE_STRING pRegistryPathStr)
    1522 {
     1517DECLHIDDEN(NDIS_STATUS) vboxNetFltWinPtRegister(PVBOXNETFLTGLOBALS_PT pGlobalsPt, PDRIVER_OBJECT pDriverObject,
     1518                                                PUNICODE_STRING pRegistryPathStr)
     1519{
     1520    RT_NOREF2(pDriverObject, pRegistryPathStr);
    15231521    NDIS_PROTOCOL_CHARACTERISTICS PtChars;
    15241522    NDIS_STRING NameStr;
Note: See TracChangeset for help on using the changeset viewer.

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