mirror of
https://github.com/intel/compute-runtime.git
synced 2026-01-08 14:02:58 +08:00
Add UNUSED_VARIABLE helper macro
Change-Id: If293ad33899ee4feb79424c351b13ea85306c603 Signed-off-by: Filip Hazubski <filip.hazubski@intel.com>
This commit is contained in:
committed by
sys_ocldev
parent
280b66fb97
commit
487c4c6e4b
@@ -179,7 +179,7 @@ cl_int CL_API_CALL clGetDeviceIDs(cl_platform_id platform,
|
||||
pPlatform = constructPlatform();
|
||||
bool ret = pPlatform->initialize();
|
||||
DEBUG_BREAK_IF(ret != true);
|
||||
((void)(ret));
|
||||
UNUSED_VARIABLE(ret);
|
||||
}
|
||||
|
||||
DEBUG_BREAK_IF(pPlatform->isInitialized() != true);
|
||||
|
||||
@@ -1415,7 +1415,7 @@ cl_int Kernel::setArgImmediate(uint32_t argIndex,
|
||||
auto pSrc = ptrOffset(argVal, kernelArgPatchInfo.sourceOffset);
|
||||
|
||||
DEBUG_BREAK_IF(!(ptrOffset(pDst, kernelArgPatchInfo.size) <= crossThreadDataEnd));
|
||||
((void)(crossThreadDataEnd));
|
||||
UNUSED_VARIABLE(crossThreadDataEnd);
|
||||
|
||||
if (kernelArgPatchInfo.sourceOffset < argSize) {
|
||||
size_t maxBytesToCopy = argSize - kernelArgPatchInfo.sourceOffset;
|
||||
|
||||
@@ -282,7 +282,7 @@ GraphicsAllocation *DrmMemoryManager::allocateGraphicsMemoryForImageImpl(const A
|
||||
|
||||
auto ret = this->drm->ioctl(DRM_IOCTL_I915_GEM_CREATE, &create);
|
||||
DEBUG_BREAK_IF(ret != 0);
|
||||
((void)(ret));
|
||||
UNUSED_VARIABLE(ret);
|
||||
|
||||
auto bo = new (std::nothrow) BufferObject(this->drm, create.handle, allocationData.rootDeviceIndex);
|
||||
if (!bo) {
|
||||
@@ -293,7 +293,7 @@ GraphicsAllocation *DrmMemoryManager::allocateGraphicsMemoryForImageImpl(const A
|
||||
|
||||
auto ret2 = bo->setTiling(I915_TILING_Y, static_cast<uint32_t>(allocationData.imgInfo->rowPitch));
|
||||
DEBUG_BREAK_IF(ret2 != true);
|
||||
((void)(ret2));
|
||||
UNUSED_VARIABLE(ret2);
|
||||
|
||||
auto allocation = new DrmAllocation(allocationData.rootDeviceIndex, allocationData.type, bo, nullptr, gpuRange, allocationData.imgInfo->size, MemoryPool::SystemCpuInaccessible);
|
||||
allocation->setDefaultGmm(gmm.release());
|
||||
@@ -412,7 +412,7 @@ GraphicsAllocation *DrmMemoryManager::createGraphicsAllocationFromSharedHandle(o
|
||||
int err = errno;
|
||||
printDebugString(DebugManager.flags.PrintDebugMessages.get(), stderr, "ioctl(PRIME_FD_TO_HANDLE) failed with %d. errno=%d(%s)\n", ret, err, strerror(err));
|
||||
DEBUG_BREAK_IF(ret != 0);
|
||||
((void)(ret));
|
||||
UNUSED_VARIABLE(ret);
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
@@ -448,7 +448,7 @@ GraphicsAllocation *DrmMemoryManager::createGraphicsAllocationFromSharedHandle(o
|
||||
ret = this->drm->ioctl(DRM_IOCTL_I915_GEM_GET_TILING, &getTiling);
|
||||
|
||||
DEBUG_BREAK_IF(ret != 0);
|
||||
((void)(ret));
|
||||
UNUSED_VARIABLE(ret);
|
||||
|
||||
if (getTiling.tiling_mode == I915_TILING_NONE) {
|
||||
properties.imgInfo->linearStorage = true;
|
||||
@@ -545,7 +545,7 @@ uint64_t DrmMemoryManager::getSystemSharedMemory() {
|
||||
getContextParam.param = I915_CONTEXT_PARAM_GTT_SIZE;
|
||||
auto ret = drm->ioctl(DRM_IOCTL_I915_GEM_CONTEXT_GETPARAM, &getContextParam);
|
||||
DEBUG_BREAK_IF(ret != 0);
|
||||
((void)(ret));
|
||||
UNUSED_VARIABLE(ret);
|
||||
uint64_t gpuMemorySize = getContextParam.value;
|
||||
|
||||
return std::min(hostMemorySize, gpuMemorySize);
|
||||
@@ -603,7 +603,7 @@ void DrmMemoryManager::cleanOsHandles(OsHandleStorage &handleStorage) {
|
||||
search->wait(-1);
|
||||
auto refCount = unreference(search, true);
|
||||
DEBUG_BREAK_IF(refCount != 1u);
|
||||
((void)(refCount));
|
||||
UNUSED_VARIABLE(refCount);
|
||||
}
|
||||
delete handleStorage.fragmentStorageData[i].osHandleStorage;
|
||||
handleStorage.fragmentStorageData[i].osHandleStorage = nullptr;
|
||||
|
||||
@@ -118,7 +118,7 @@ class TagAllocator {
|
||||
MOCKABLE_VIRTUAL void returnTagToFreePool(NodeType *node) {
|
||||
NodeType *usedNode = usedTags.removeOne(*node).release();
|
||||
DEBUG_BREAK_IF(usedNode == nullptr);
|
||||
((void)(usedNode));
|
||||
UNUSED_VARIABLE(usedNode);
|
||||
freeTags.pushFrontOne(*node);
|
||||
}
|
||||
|
||||
@@ -152,7 +152,7 @@ class TagAllocator {
|
||||
Start += tagSize;
|
||||
}
|
||||
DEBUG_BREAK_IF(Start > End);
|
||||
((void)(End));
|
||||
UNUSED_VARIABLE(End);
|
||||
tagPoolMemory.push_back(nodesMemory);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user