SWDEV-306939 - Fix vdi errors/warnings by CppCheck

Change-Id: I56d910f8363787f1050d5d7e8064ed553c5827fd


[ROCm/clr commit: e20dd61932]
이 커밋은 다음에 포함됨:
Satyanvesh Dittakavi가 2022-01-12 00:22:16 -05:00를 커밋했습니다
1 부모 0f38461bb6
커밋 85c2cac111
45 파일이 변경됨
+113 -160

검색과 일치하는 파일 없음

+2 -4
파일 보기
@@ -1178,10 +1178,9 @@ bool Image::Format::isSupported(const Context& context, cl_mem_object_type image
// ================================================================================================
Image* Image::createView(const Context& context, const Format& format, device::VirtualDevice* vDev,
uint baseMipLevel, cl_mem_flags flags) {
Image* view = nullptr;
// Find the image dimensions and create a corresponding object
view = new (context) Image(format, *this, baseMipLevel, flags);
Image* view = new (context) Image(format, *this, baseMipLevel, flags);
if (view != nullptr) {
// Set GPU virtual device for this view
@@ -1234,12 +1233,11 @@ bool Image::isRowSliceValid(size_t rowPitch, size_t slice, size_t width, size_t
}
void Image::copyToBackingStore(void* initFrom) {
char* src;
char* dst = reinterpret_cast<char*>(getHostMem());
size_t cpySize = getWidth() * getImageFormat().getElementSize();
for (uint z = 0; z < getDepth(); ++z) {
src = reinterpret_cast<char*>(initFrom) + z * getSlicePitch();
char* src = reinterpret_cast<char*>(initFrom) + z * getSlicePitch();
for (uint y = 0; y < getHeight(); ++y) {
memcpy(dst, src, cpySize);
dst += cpySize;