summaryrefslogtreecommitdiff
path: root/src/VBox/Runtime/r0drv/os2
diff options
context:
space:
mode:
authorvboxsync <vboxsync@cfe28804-0f27-0410-a406-dd0f0b0b656f>2018-10-28 17:49:49 +0000
committervboxsync <vboxsync@cfe28804-0f27-0410-a406-dd0f0b0b656f>2018-10-28 17:49:49 +0000
commit88ca90207eeb7fc3373984af53e38a33dff0b430 (patch)
tree298b543ec74f3e045eb3a52b92fa2dcb6d8cd943 /src/VBox/Runtime/r0drv/os2
parentb8be5132a5f2d21efc49ce1b2269dd3d380c1ffc (diff)
downloadVirtualBox-svn-88ca90207eeb7fc3373984af53e38a33dff0b430.tar.gz
IPRT: Shut up some warnings.
git-svn-id: https://www.virtualbox.org/svn/vbox/trunk@75133 cfe28804-0f27-0410-a406-dd0f0b0b656f
Diffstat (limited to 'src/VBox/Runtime/r0drv/os2')
-rw-r--r--src/VBox/Runtime/r0drv/os2/memobj-r0drv-os2.cpp8
-rw-r--r--src/VBox/Runtime/r0drv/os2/memuserkernel-r0drv-os2.cpp2
-rw-r--r--src/VBox/Runtime/r0drv/os2/semeventmulti-r0drv-os2.cpp3
-rw-r--r--src/VBox/Runtime/r0drv/os2/spinlock-r0drv-os2.cpp1
-rw-r--r--src/VBox/Runtime/r0drv/os2/timer-r0drv-os2.cpp4
5 files changed, 13 insertions, 5 deletions
diff --git a/src/VBox/Runtime/r0drv/os2/memobj-r0drv-os2.cpp b/src/VBox/Runtime/r0drv/os2/memobj-r0drv-os2.cpp
index 98ce9232127..189a3fcabf0 100644
--- a/src/VBox/Runtime/r0drv/os2/memobj-r0drv-os2.cpp
+++ b/src/VBox/Runtime/r0drv/os2/memobj-r0drv-os2.cpp
@@ -79,7 +79,6 @@ DECLHIDDEN(int) rtR0MemObjNativeFree(RTR0MEMOBJ pMem)
case RTR0MEMOBJTYPE_PHYS_NC:
AssertMsgFailed(("RTR0MEMOBJTYPE_PHYS_NC\n"));
return VERR_INTERNAL_ERROR;
- break;
case RTR0MEMOBJTYPE_PHYS:
if (!pMemOs2->Core.pv)
@@ -308,6 +307,7 @@ DECLHIDDEN(int) rtR0MemObjNativeLockKernel(PPRTR0MEMOBJINTERNAL ppMem, void *pv,
DECLHIDDEN(int) rtR0MemObjNativeReserveKernel(PPRTR0MEMOBJINTERNAL ppMem, void *pvFixed, size_t cb, size_t uAlignment)
{
+ RT_NOREF(ppMem, pvFixed, cb, uAlignment);
return VERR_NOT_SUPPORTED;
}
@@ -315,6 +315,7 @@ DECLHIDDEN(int) rtR0MemObjNativeReserveKernel(PPRTR0MEMOBJINTERNAL ppMem, void *
DECLHIDDEN(int) rtR0MemObjNativeReserveUser(PPRTR0MEMOBJINTERNAL ppMem, RTR3PTR R3PtrFixed, size_t cb, size_t uAlignment,
RTR0PROCESS R0Process)
{
+ RT_NOREF(ppMem, R3PtrFixed, cb, uAlignment, R0Process);
return VERR_NOT_SUPPORTED;
}
@@ -355,7 +356,8 @@ DECLHIDDEN(int) rtR0MemObjNativeMapKernel(PPRTR0MEMOBJINTERNAL ppMem, RTR0MEMOBJ
/* no ring-0 mapping, so allocate a mapping in the process. */
AssertMsgReturn(fProt & RTMEM_PROT_WRITE, ("%#x\n", fProt), VERR_NOT_SUPPORTED);
Assert(!pMemToMapOs2->Core.u.Phys.fAllocated);
- ULONG ulPhys = pMemToMapOs2->Core.u.Phys.PhysBase;
+ ULONG ulPhys = (ULONG)pMemToMapOs2->Core.u.Phys.PhysBase;
+ AssertReturn(ulPhys == pMemToMapOs2->Core.u.Phys.PhysBase, VERR_OUT_OF_RANGE);
rc = KernVMAlloc(pMemToMapOs2->Core.cb, VMDHA_PHYS, &pvR0, (PPVOID)&ulPhys, NULL);
if (rc)
return RTErrConvertFromOS2(rc);
@@ -366,7 +368,6 @@ DECLHIDDEN(int) rtR0MemObjNativeMapKernel(PPRTR0MEMOBJINTERNAL ppMem, RTR0MEMOBJ
case RTR0MEMOBJTYPE_PHYS_NC:
AssertMsgFailed(("RTR0MEMOBJTYPE_PHYS_NC\n"));
return VERR_INTERNAL_ERROR_3;
- break;
case RTR0MEMOBJTYPE_LOCK:
if (pMemToMapOs2->Core.u.Lock.R0Process != NIL_RTR0PROCESS)
@@ -443,7 +444,6 @@ DECLHIDDEN(int) rtR0MemObjNativeMapUser(PPRTR0MEMOBJINTERNAL ppMem, RTR0MEMOBJ p
case RTR0MEMOBJTYPE_PHYS_NC:
AssertMsgFailed(("RTR0MEMOBJTYPE_PHYS_NC\n"));
return VERR_INTERNAL_ERROR_5;
- break;
case RTR0MEMOBJTYPE_LOCK:
if (pMemToMapOs2->Core.u.Lock.R0Process != NIL_RTR0PROCESS)
diff --git a/src/VBox/Runtime/r0drv/os2/memuserkernel-r0drv-os2.cpp b/src/VBox/Runtime/r0drv/os2/memuserkernel-r0drv-os2.cpp
index 299f56927a2..f96587e8868 100644
--- a/src/VBox/Runtime/r0drv/os2/memuserkernel-r0drv-os2.cpp
+++ b/src/VBox/Runtime/r0drv/os2/memuserkernel-r0drv-os2.cpp
@@ -78,12 +78,14 @@ RTR0DECL(bool) RTR0MemAreKrnlAndUsrDifferent(void)
RTR0DECL(int) RTR0MemKernelCopyFrom(void *pvDst, void const *pvSrc, size_t cb)
{
+ RT_NOREF(pvDst, pvSrc, cb);
return VERR_NOT_SUPPORTED;
}
RTR0DECL(int) RTR0MemKernelCopyTo(void *pvDst, void const *pvSrc, size_t cb)
{
+ RT_NOREF(pvDst, pvSrc, cb);
return VERR_NOT_SUPPORTED;
}
diff --git a/src/VBox/Runtime/r0drv/os2/semeventmulti-r0drv-os2.cpp b/src/VBox/Runtime/r0drv/os2/semeventmulti-r0drv-os2.cpp
index f0aba6aed85..a1276831ac8 100644
--- a/src/VBox/Runtime/r0drv/os2/semeventmulti-r0drv-os2.cpp
+++ b/src/VBox/Runtime/r0drv/os2/semeventmulti-r0drv-os2.cpp
@@ -90,6 +90,7 @@ RTDECL(int) RTSemEventMultiCreateEx(PRTSEMEVENTMULTI phEventMultiSem, uint32_t
*phEventMultiSem = pThis;
return VINF_SUCCESS;
}
+ RT_NOREF(hClass, pszNameFmt);
return VERR_NO_MEMORY;
}
@@ -177,6 +178,8 @@ RTDECL(int) RTSemEventMultiReset(RTSEMEVENTMULTI hEventMultiSem)
static int rtR0SemEventMultiOs2Wait(PRTSEMEVENTMULTIINTERNAL pThis, uint32_t fFlags, uint64_t uTimeout,
PCRTLOCKVALSRCPOS pSrcPos)
{
+ RT_NOREF(pSrcPos);
+
/*
* Validate and convert the input.
*/
diff --git a/src/VBox/Runtime/r0drv/os2/spinlock-r0drv-os2.cpp b/src/VBox/Runtime/r0drv/os2/spinlock-r0drv-os2.cpp
index c980b09fea5..3b1b9251099 100644
--- a/src/VBox/Runtime/r0drv/os2/spinlock-r0drv-os2.cpp
+++ b/src/VBox/Runtime/r0drv/os2/spinlock-r0drv-os2.cpp
@@ -66,6 +66,7 @@ typedef struct RTSPINLOCKINTERNAL
RTDECL(int) RTSpinlockCreate(PRTSPINLOCK pSpinlock, uint32_t fFlags, const char *pszName)
{
AssertReturn(fFlags == RTSPINLOCK_FLAGS_INTERRUPT_SAFE || fFlags == RTSPINLOCK_FLAGS_INTERRUPT_UNSAFE, VERR_INVALID_PARAMETER);
+ RT_NOREF(pszName);
/*
* Allocate.
diff --git a/src/VBox/Runtime/r0drv/os2/timer-r0drv-os2.cpp b/src/VBox/Runtime/r0drv/os2/timer-r0drv-os2.cpp
index 2511b5644f8..00d352c7096 100644
--- a/src/VBox/Runtime/r0drv/os2/timer-r0drv-os2.cpp
+++ b/src/VBox/Runtime/r0drv/os2/timer-r0drv-os2.cpp
@@ -288,7 +288,7 @@ RTDECL(int) RTTimerChangeInterval(PRTTIMER pTimer, uint64_t u64NanoInterval)
{
if (!rtTimerIsValid(pTimer))
return VERR_INVALID_HANDLE;
-
+ RT_NOREF(u64NanoInterval);
return VERR_NOT_SUPPORTED;
}
@@ -366,12 +366,14 @@ RTDECL(uint32_t) RTTimerGetSystemGranularity(void)
RTDECL(int) RTTimerRequestSystemGranularity(uint32_t u32Request, uint32_t *pu32Granted)
{
+ RT_NOREF(u32Request, pu32Granted);
return VERR_NOT_SUPPORTED;
}
RTDECL(int) RTTimerReleaseSystemGranularity(uint32_t u32Granted)
{
+ RT_NOREF(u32Granted);
return VERR_NOT_SUPPORTED;
}