VirtualBox

Changeset 83825 in vbox


Ignore:
Timestamp:
Apr 19, 2020 1:23:28 AM (5 years ago)
Author:
vboxsync
Message:

VBoxMRXNP: VC++ 14.1 warnings. bugref:8489

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Additions/WINNT/SharedFolders/np/vboxmrxnp.cpp

    r82968 r83825  
    11451145    {
    11461146        /* It is a leading backslash. Construct "no parent" NETRESOURCE. */
    1147         NETRESOURCE *pNetResource = (NETRESOURCE *)pBuffer;
     1147        NETRESOURCE *pNetResourceNP = (NETRESOURCE *)pBuffer;
    11481148
    11491149        cbEntry = sizeof(NETRESOURCE);
     
    11591159        else
    11601160        {
    1161             memset (pNetResource, 0, sizeof (*pNetResource));
    1162 
    1163             pNetResource->dwType = RESOURCETYPE_ANY;
    1164             pNetResource->dwDisplayType = RESOURCEDISPLAYTYPE_NETWORK;
    1165             pNetResource->dwUsage = RESOURCEUSAGE_CONTAINER;
     1161            memset (pNetResourceNP, 0, sizeof (*pNetResourceNP));
     1162
     1163            pNetResourceNP->dwType = RESOURCETYPE_ANY;
     1164            pNetResourceNP->dwDisplayType = RESOURCEDISPLAYTYPE_NETWORK;
     1165            pNetResourceNP->dwUsage = RESOURCEUSAGE_CONTAINER;
    11661166
    11671167            WCHAR *pStrings = (WCHAR *)((PBYTE)pBuffer + *pBufferSize);
    11681168            pStrings = (PWCHAR)((PBYTE)pStrings - (cbEntry - sizeof(NETRESOURCE)));
    11691169
    1170             pNetResource->lpRemoteName = pStrings;
     1170            pNetResourceNP->lpRemoteName = pStrings;
    11711171            CopyMemory (pStrings, MRX_VBOX_PROVIDER_NAME_U, sizeof(MRX_VBOX_PROVIDER_NAME_U));
    11721172            pStrings += sizeof(MRX_VBOX_PROVIDER_NAME_U) / sizeof(WCHAR);
    11731173
    1174             pNetResource->lpProvider = pStrings;
     1174            pNetResourceNP->lpProvider = pStrings;
    11751175            CopyMemory (pStrings, MRX_VBOX_PROVIDER_NAME_U, sizeof(MRX_VBOX_PROVIDER_NAME_U));
    11761176            pStrings += sizeof(MRX_VBOX_PROVIDER_NAME_U) / sizeof(WCHAR);
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