SWDEV-306939 - Fix vdi errors/warnings by CppCheck

Change-Id: I56d910f8363787f1050d5d7e8064ed553c5827fd
Tento commit je obsažen v:
Satyanvesh Dittakavi
2021-12-01 17:23:00 +00:00
rodič 8b5b2a2d79
revize e20dd61932
45 změnil soubory, kde provedl 113 přidání a 160 odebrání
+2 -5
Zobrazit soubor
@@ -241,12 +241,11 @@ bool NullProgram::linkImpl(amd::option::Options* options) {
if ((dbgSize > 0) && options->isDumpFlagSet(amd::option::DUMP_DEBUGIL)) {
std::string debugilWithLine;
size_t b = 1;
size_t e;
int linenum = 0;
char cstr[9];
cstr[8] = 0;
while (b != std::string::npos) {
e = debugILStr.find_first_of("\n", b);
size_t e = debugILStr.find_first_of("\n", b);
if (e != std::string::npos) {
++e;
}
@@ -582,12 +581,11 @@ bool NullProgram::linkImpl(const std::vector<device::Program*>& inputPrograms,
if ((dbgSize > 0) && options->isDumpFlagSet(amd::option::DUMP_DEBUGIL)) {
std::string debugilWithLine;
size_t b = 1;
size_t e;
int linenum = 0;
char cstr[9];
cstr[8] = 0;
while (b != std::string::npos) {
e = debugILStr.find_first_of("\n", b);
size_t e = debugILStr.find_first_of("\n", b);
if (e != std::string::npos) {
++e;
}
@@ -1978,7 +1976,6 @@ bool ORCAHSALoaderContext::GpuMemCopy(void* dst, size_t offset, const void* src,
gpu::Memory* mem = reinterpret_cast<gpu::Memory*>(dst);
return program_->gpuDevice().xferMgr().writeBuffer(src, *mem, amd::Coord3D(offset), amd::Coord3D(size),
true);
return true;
}
void ORCAHSALoaderContext::GpuMemFree(void* ptr, size_t size) {