Fix warning from default cppchek.

[ROCm/hip commit: 4313686d6e]
This commit is contained in:
Ben Sander
2017-11-21 15:41:15 -06:00
parent 539bef9b4c
commit 419a80db24
2 changed files with 5 additions and 4 deletions
+2 -1
View File
@@ -1744,8 +1744,9 @@ hipError_t hipIpcGetMemHandle(hipIpcMemHandle_t* handle, void* devPtr){
am_status_t status = hc::am_memtracker_getinfo( &amPointerInfo , devPtr );
if (status == AM_SUCCESS) {
psize = (size_t)amPointerInfo._sizeBytes;
} else
} else {
hipStatus = hipErrorInvalidResourceHandle;
}
ihipIpcMemHandle_t* iHandle = (ihipIpcMemHandle_t*) handle;
// Save the size of the pointer to hipIpcMemHandle
iHandle->psize = psize;