diff options
author | vboxsync <vboxsync@cfe28804-0f27-0410-a406-dd0f0b0b656f> | 2016-08-10 12:04:54 +0000 |
---|---|---|
committer | vboxsync <vboxsync@cfe28804-0f27-0410-a406-dd0f0b0b656f> | 2016-08-10 12:04:54 +0000 |
commit | 68c59aca16ac34b55c7378ca771a6bb406efc263 (patch) | |
tree | 214001f294136ff21e8366d5a1d0cea95b65ea32 | |
parent | e048bb320c687035649622b4cea1de2c9122716e (diff) | |
download | VirtualBox-svn-68c59aca16ac34b55c7378ca771a6bb406efc263.tar.gz |
Main: warnings
git-svn-id: https://www.virtualbox.org/svn/vbox/trunk@63256 cfe28804-0f27-0410-a406-dd0f0b0b656f
-rw-r--r-- | src/VBox/Main/include/netif.h | 10 | ||||
-rw-r--r-- | src/VBox/Main/src-all/AuthLibrary.cpp | 3 | ||||
-rw-r--r-- | src/VBox/Main/src-client/RemoteUSBBackend.cpp | 2 | ||||
-rw-r--r-- | src/VBox/Main/src-client/VideoRec.cpp | 6 | ||||
-rw-r--r-- | src/VBox/Main/src-server/MachineImpl.cpp | 2 | ||||
-rw-r--r-- | src/VBox/Main/src-server/MediumImpl.cpp | 1 | ||||
-rw-r--r-- | src/VBox/Main/src-server/SystemPropertiesImpl.cpp | 1 | ||||
-rw-r--r-- | src/VBox/Main/src-server/VirtualBoxImpl.cpp | 1 | ||||
-rw-r--r-- | src/VBox/Main/src-server/win/HostPowerWin.cpp | 3 | ||||
-rw-r--r-- | src/VBox/Main/src-server/win/NetIf-win.cpp | 27 | ||||
-rw-r--r-- | src/VBox/Main/src-server/win/PerformanceWin.cpp | 2 |
11 files changed, 36 insertions, 22 deletions
diff --git a/src/VBox/Main/include/netif.h b/src/VBox/Main/include/netif.h index 7cc8e3c547e..a1455ee5aa8 100644 --- a/src/VBox/Main/include/netif.h +++ b/src/VBox/Main/include/netif.h @@ -88,14 +88,14 @@ int NetIfList(std::list <ComObjPtr<HostNetworkInterface> > &list); int NetIfEnableStaticIpConfig(VirtualBox *pVBox, HostNetworkInterface * pIf, ULONG aOldIp, ULONG aNewIp, ULONG aMask); int NetIfEnableStaticIpConfigV6(VirtualBox *pVBox, HostNetworkInterface * pIf, IN_BSTR aOldIPV6Address, IN_BSTR aIPV6Address, ULONG aIPV6MaskPrefixLength); int NetIfEnableDynamicIpConfig(VirtualBox *pVBox, HostNetworkInterface * pIf); -int NetIfCreateHostOnlyNetworkInterface (VirtualBox *pVBox, IHostNetworkInterface **aHostNetworkInterface, IProgress **aProgress, const char *pcszName = NULL); -int NetIfRemoveHostOnlyNetworkInterface (VirtualBox *pVBox, IN_GUID aId, IProgress **aProgress); +int NetIfCreateHostOnlyNetworkInterface(VirtualBox *pVBox, IHostNetworkInterface **aHostNetworkInterface, IProgress **aProgress, const char *pszName = NULL); +int NetIfRemoveHostOnlyNetworkInterface(VirtualBox *pVBox, IN_GUID aId, IProgress **aProgress); int NetIfGetConfig(HostNetworkInterface * pIf, NETIFINFO *); int NetIfGetConfigByName(PNETIFINFO pInfo); -int NetIfGetState(const char *pcszIfName, NETIFSTATUS *penmState); -int NetIfGetLinkSpeed(const char *pcszIfName, uint32_t *puMbits); +int NetIfGetState(const char *pszIfName, NETIFSTATUS *penmState); +int NetIfGetLinkSpeed(const char *pszIfName, uint32_t *puMbits); int NetIfDhcpRediscover(VirtualBox *pVBox, HostNetworkInterface * pIf); -int NetIfAdpCtlOut(const char * pcszName, const char * pcszCmd, char *pszBuffer, size_t cBufSize); +int NetIfAdpCtlOut(const char *pszName, const char *pszCmd, char *pszBuffer, size_t cBufSize); DECLINLINE(Bstr) composeIPv6Address(PRTNETADDRIPV6 aAddrPtr) { diff --git a/src/VBox/Main/src-all/AuthLibrary.cpp b/src/VBox/Main/src-all/AuthLibrary.cpp index 43a8817eddb..5354cfafc4a 100644 --- a/src/VBox/Main/src-all/AuthLibrary.cpp +++ b/src/VBox/Main/src-all/AuthLibrary.cpp @@ -41,8 +41,9 @@ typedef struct AuthCtx unsigned clientId; } AuthCtx; -static DECLCALLBACK(int) authThread(RTTHREAD self, void *pvUser) +static DECLCALLBACK(int) authThread(RTTHREAD hThreadSelf, void *pvUser) { + RT_NOREF(hThreadSelf); AuthCtx *pCtx = (AuthCtx *)pvUser; if (pCtx->pfnAuthEntry3) diff --git a/src/VBox/Main/src-client/RemoteUSBBackend.cpp b/src/VBox/Main/src-client/RemoteUSBBackend.cpp index ec7a5304dd3..4bc8b836117 100644 --- a/src/VBox/Main/src-client/RemoteUSBBackend.cpp +++ b/src/VBox/Main/src-client/RemoteUSBBackend.cpp @@ -154,6 +154,7 @@ static void qurbFree (REMOTEUSBQURB *pQURB) /* Called by VRDP server when the client responds to a request on USB channel. */ DECLCALLBACK(int) USBClientResponseCallback(void *pv, uint32_t u32ClientId, uint8_t code, const void *pvRet, uint32_t cbRet) { + RT_NOREF(u32ClientId); int rc = VINF_SUCCESS; LogFlow(("USBClientResponseCallback: id = %d, pv = %p, code = %d, pvRet = %p, cbRet = %d\n", @@ -253,6 +254,7 @@ DECLCALLBACK(int) USBClientResponseCallback(void *pv, uint32_t u32ClientId, uint static DECLCALLBACK(int) iface_Open(PREMOTEUSBBACKEND pInstance, const char *pszAddress, size_t cbAddress, PREMOTEUSBDEVICE *ppDevice) { + RT_NOREF(cbAddress); int rc = VINF_SUCCESS; RemoteUSBBackend *pThis = (RemoteUSBBackend *)pInstance; diff --git a/src/VBox/Main/src-client/VideoRec.cpp b/src/VBox/Main/src-client/VideoRec.cpp index 2d0ca65f506..cba1dd0c916 100644 --- a/src/VBox/Main/src-client/VideoRec.cpp +++ b/src/VBox/Main/src-client/VideoRec.cpp @@ -385,8 +385,9 @@ inline bool colorConvWriteRGB24(unsigned aWidth, unsigned aHeight, * * RGB/YUV conversion and encoding. */ -static DECLCALLBACK(int) videoRecThread(RTTHREAD Thread, void *pvUser) +static DECLCALLBACK(int) videoRecThread(RTTHREAD hThreadSelf, void *pvUser) { + RT_NOREF(hThreadSelf); PVIDEORECCONTEXT pCtx = (PVIDEORECCONTEXT)pvUser; for (;;) { @@ -613,7 +614,7 @@ void VideoRecContextClose(PVIDEORECCONTEXT pCtx) pStrm->Ebml.close(); vpx_img_free(&pStrm->VpxRawImage); vpx_codec_err_t rcv = vpx_codec_destroy(&pStrm->VpxCodec); - Assert(rcv == VPX_CODEC_OK); + Assert(rcv == VPX_CODEC_OK); RT_NOREF(rcv); RTMemFree(pStrm->pu8RgbBuf); pStrm->pu8RgbBuf = NULL; } @@ -634,6 +635,7 @@ void VideoRecContextClose(PVIDEORECCONTEXT pCtx) */ bool VideoRecIsEnabled(PVIDEORECCONTEXT pCtx) { + RT_NOREF(pCtx); uint32_t enmState = ASMAtomicReadU32(&g_enmState); return ( enmState == VIDREC_IDLE || enmState == VIDREC_COPYING); diff --git a/src/VBox/Main/src-server/MachineImpl.cpp b/src/VBox/Main/src-server/MachineImpl.cpp index ab2149e4e9b..0a099194b47 100644 --- a/src/VBox/Main/src-server/MachineImpl.cpp +++ b/src/VBox/Main/src-server/MachineImpl.cpp @@ -2738,6 +2738,7 @@ HRESULT Machine::getSettingsFilePath(com::Utf8Str &aSettingsFilePath) HRESULT Machine::getSettingsAuxFilePath(com::Utf8Str &aSettingsFilePath) { + RT_NOREF(aSettingsFilePath); ReturnComNotImplemented(); } @@ -7127,6 +7128,7 @@ HRESULT Machine::getVMProcessPriority(com::Utf8Str &aVMProcessPriority) HRESULT Machine::setVMProcessPriority(const com::Utf8Str &aVMProcessPriority) { + RT_NOREF(aVMProcessPriority); AutoWriteLock alock(this COMMA_LOCKVAL_SRC_POS); HRESULT hrc = i_checkStateDependency(MutableOrSavedOrRunningStateDep); if (SUCCEEDED(hrc)) diff --git a/src/VBox/Main/src-server/MediumImpl.cpp b/src/VBox/Main/src-server/MediumImpl.cpp index 917d7120b05..dda243331d4 100644 --- a/src/VBox/Main/src-server/MediumImpl.cpp +++ b/src/VBox/Main/src-server/MediumImpl.cpp @@ -6419,6 +6419,7 @@ HRESULT Medium::i_preparationForMoving(const Utf8Str &aLocation) */ bool Medium::i_isMoveOperation(const ComObjPtr<Medium> &aTarget) const { + RT_NOREF(aTarget); return (m->fMoveThisMedium == true) ? true:false; } diff --git a/src/VBox/Main/src-server/SystemPropertiesImpl.cpp b/src/VBox/Main/src-server/SystemPropertiesImpl.cpp index bf103a6571e..94d205411a0 100644 --- a/src/VBox/Main/src-server/SystemPropertiesImpl.cpp +++ b/src/VBox/Main/src-server/SystemPropertiesImpl.cpp @@ -947,6 +947,7 @@ HRESULT SystemProperties::getDefaultAdditionsISO(com::Utf8Str &aDefaultAdditions HRESULT SystemProperties::setDefaultAdditionsISO(const com::Utf8Str &aDefaultAdditionsISO) { + RT_NOREF(aDefaultAdditionsISO); /** @todo not yet implemented, settings handling is missing */ ReturnComNotImplemented(); #if 0 /* not implemented */ diff --git a/src/VBox/Main/src-server/VirtualBoxImpl.cpp b/src/VBox/Main/src-server/VirtualBoxImpl.cpp index 4e973e0fafe..45f62d13e56 100644 --- a/src/VBox/Main/src-server/VirtualBoxImpl.cpp +++ b/src/VBox/Main/src-server/VirtualBoxImpl.cpp @@ -1947,7 +1947,6 @@ HRESULT VirtualBox::getGuestOSType(const com::Utf8Str &aId, aType = NULL; AutoReadLock alock(m->allGuestOSTypes.getLockHandle() COMMA_LOCKVAL_SRC_POS); - HRESULT rc = S_OK; for (GuestOSTypesOList::iterator it = m->allGuestOSTypes.begin(); it != m->allGuestOSTypes.end(); ++it) diff --git a/src/VBox/Main/src-server/win/HostPowerWin.cpp b/src/VBox/Main/src-server/win/HostPowerWin.cpp index 4485caa3840..c0c786da3a9 100644 --- a/src/VBox/Main/src-server/win/HostPowerWin.cpp +++ b/src/VBox/Main/src-server/win/HostPowerWin.cpp @@ -62,8 +62,9 @@ HostPowerServiceWin::~HostPowerServiceWin() -DECLCALLBACK(int) HostPowerServiceWin::NotificationThread(RTTHREAD ThreadSelf, void *pInstance) +DECLCALLBACK(int) HostPowerServiceWin::NotificationThread(RTTHREAD hThreadSelf, void *pInstance) { + RT_NOREF(hThreadSelf); HostPowerServiceWin *pPowerObj = (HostPowerServiceWin *)pInstance; HWND hwnd = 0; diff --git a/src/VBox/Main/src-server/win/NetIf-win.cpp b/src/VBox/Main/src-server/win/NetIf-win.cpp index edae6ebc296..0f471c7f429 100644 --- a/src/VBox/Main/src-server/win/NetIf-win.cpp +++ b/src/VBox/Main/src-server/win/NetIf-win.cpp @@ -96,8 +96,8 @@ static int getDefaultInterfaceIndex() static int collectNetIfInfo(Bstr &strName, Guid &guid, PNETIFINFO pInfo, int iDefault) { - DWORD dwRc; - int rc = VINF_SUCCESS; + RT_NOREF(strName); + /* * Most of the hosts probably have less than 10 adapters, * so we'll mostly succeed from the first attempt. @@ -106,7 +106,7 @@ static int collectNetIfInfo(Bstr &strName, Guid &guid, PNETIFINFO pInfo, int iDe PIP_ADAPTER_ADDRESSES pAddresses = (PIP_ADAPTER_ADDRESSES)RTMemAlloc(uBufLen); if (!pAddresses) return VERR_NO_MEMORY; - dwRc = GetAdaptersAddresses(AF_UNSPEC, GAA_FLAG_INCLUDE_PREFIX, NULL, pAddresses, &uBufLen); + DWORD dwRc = GetAdaptersAddresses(AF_UNSPEC, GAA_FLAG_INCLUDE_PREFIX, NULL, pAddresses, &uBufLen); if (dwRc == ERROR_BUFFER_OVERFLOW) { /* Impressive! More than 10 adapters! Get more memory and try again. */ @@ -1111,11 +1111,12 @@ int NetIfGetConfigByName(PNETIFINFO) * * @returns VBox status code. * - * @param pcszIfName Interface name. + * @param pszIfName Interface name. * @param penmState Where to store the retrieved state. */ -int NetIfGetState(const char *pcszIfName, NETIFSTATUS *penmState) +int NetIfGetState(const char *pszIfName, NETIFSTATUS *penmState) { + RT_NOREF(pszIfName, penmState); return VERR_NOT_IMPLEMENTED; } @@ -1125,19 +1126,21 @@ int NetIfGetState(const char *pcszIfName, NETIFSTATUS *penmState) * * @returns VBox status code. * - * @param pcszIfName Interface name. + * @param pszIfName Interface name. * @param puMbits Where to store the link speed. */ -int NetIfGetLinkSpeed(const char * /*pcszIfName*/, uint32_t * /*puMbits*/) +int NetIfGetLinkSpeed(const char *pszIfName, uint32_t *puMbits) { + RT_NOREF(pszIfName, puMbits); return VERR_NOT_IMPLEMENTED; } int NetIfCreateHostOnlyNetworkInterface(VirtualBox *pVirtualBox, IHostNetworkInterface **aHostNetworkInterface, IProgress **aProgress, - const char *pcszName) + const char *pszName) { + RT_NOREF(pszName); #ifndef VBOX_WITH_NETFLT return VERR_NOT_IMPLEMENTED; #else @@ -1225,12 +1228,12 @@ int NetIfRemoveHostOnlyNetworkInterface(VirtualBox *pVirtualBox, IN_GUID aId, int NetIfEnableStaticIpConfig(VirtualBox *vBox, HostNetworkInterface * pIf, ULONG aOldIp, ULONG ip, ULONG mask) { + RT_NOREF(aOldIp); #ifndef VBOX_WITH_NETFLT return VERR_NOT_IMPLEMENTED; #else - HRESULT rc; Bstr guid; - rc = pIf->COMGETTER(Id)(guid.asOutParam()); + HRESULT rc = pIf->COMGETTER(Id)(guid.asOutParam()); if (SUCCEEDED(rc)) { // ComPtr<VirtualBox> vBox; @@ -1283,12 +1286,12 @@ int NetIfEnableStaticIpConfig(VirtualBox *vBox, HostNetworkInterface * pIf, ULON int NetIfEnableStaticIpConfigV6(VirtualBox *vBox, HostNetworkInterface * pIf, IN_BSTR aOldIPV6Address, IN_BSTR aIPV6Address, ULONG aIPV6MaskPrefixLength) { + RT_NOREF(aOldIPV6Address); #ifndef VBOX_WITH_NETFLT return VERR_NOT_IMPLEMENTED; #else - HRESULT rc; Bstr guid; - rc = pIf->COMGETTER(Id)(guid.asOutParam()); + HRESULT rc = pIf->COMGETTER(Id)(guid.asOutParam()); if (SUCCEEDED(rc)) { // ComPtr<VirtualBox> vBox; diff --git a/src/VBox/Main/src-server/win/PerformanceWin.cpp b/src/VBox/Main/src-server/win/PerformanceWin.cpp index b64426fbd1c..f06a2354af9 100644 --- a/src/VBox/Main/src-server/win/PerformanceWin.cpp +++ b/src/VBox/Main/src-server/win/PerformanceWin.cpp @@ -194,6 +194,7 @@ int CollectorWin::preCollect(const CollectorHints& hints, uint64_t /* iTick */) int CollectorWin::getHostCpuLoad(ULONG *user, ULONG *kernel, ULONG *idle) { + RT_NOREF(user, kernel, idle); return VERR_NOT_IMPLEMENTED; } @@ -312,6 +313,7 @@ int CollectorWin::getHostMemoryUsage(ULONG *total, ULONG *used, ULONG *available int CollectorWin::getProcessCpuLoad(RTPROCESS process, ULONG *user, ULONG *kernel) { + RT_NOREF(process, user, kernel); return VERR_NOT_IMPLEMENTED; } |