SWDEV-301667 - Fix build warnings

Change-Id: Ice23b3d1a19a7958ca5c3caff34db2934b361a98


[ROCm/clr commit: 086aee0fcb]
This commit is contained in:
Saleel Kudchadker
2022-03-02 11:46:56 -08:00
parent eca06b35b9
commit 8139cc4683
8 changed files with 76 additions and 54 deletions
+2 -2
View File
@@ -297,8 +297,8 @@ hipError_t ihipCreateTextureObject(hipTextureObject_t* pTexObject,
}
void *texObjectBuffer = nullptr;
ihipMalloc(&texObjectBuffer, sizeof(__hip_texture), CL_MEM_SVM_FINE_GRAIN_BUFFER);
if (texObjectBuffer == nullptr) {
hipError_t err = ihipMalloc(&texObjectBuffer, sizeof(__hip_texture), CL_MEM_SVM_FINE_GRAIN_BUFFER);
if (texObjectBuffer == nullptr || err != hipSuccess) {
return hipErrorOutOfMemory;
}
*pTexObject = new (texObjectBuffer) __hip_texture{image, sampler, *pResDesc, *pTexDesc, (pResViewDesc != nullptr) ? *pResViewDesc : hipResourceViewDesc{}};