Примеры ошибок, обнаруженных с помощью диагностики V643
V643. Suspicious pointer arithmetic. Value of 'char' type is added to a string pointer.
Spring Engine
V643 Unusual pointer arithmetic: ".." + io->getOsSeparator(). The value of the 'char' type is being added to the string pointer. assimp lwsloader.cpp 467
std::string LWSImporter::FindLWOFile(const std::string& in)
{
....
std::string test = ".." + io->getOsSeparator() + tmp; // <=
if (io->Exists(test))
return test;
test = ".." + io->getOsSeparator() + test; // <=
if (io->Exists(test)) {
return test;
}
....
}
OpenToonz
V643 Unusual pointer arithmetic: "\\" + v[i]. The value of the 'char' type is being added to the string pointer. tstream.cpp 31
string escape(string v)
{
int i = 0;
for (;;) {
i = v.find_first_of("\\\'\"", i);
if (i == (int)string::npos)
break;
string h = "\\" + v[i]; // <=
v.insert(i, "\\");
i = i + 2;
}
return v;
}