Fixed some warnings on clang 15 that are promoted into errors (#936)

This commit is contained in:
KOLANICH 2022-09-02 08:04:23 +00:00 committed by GitHub
parent f9a1ed10ce
commit 6250cd88bb
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 1 additions and 6 deletions

View File

@ -130,7 +130,7 @@ namespace marian {
// @TODO: add checks for empty factor groups until it stops crashing (training already works; decoder still crashes)
io::InputFileStream in(modelPath);
for (WordIndex v = 0; io::getline(in, line); v++) {
for(; io::getline(in, line);) {
utils::splitAny(line, tokBuf, " \t");
factorMapTokenized.push_back(tokBuf);
}

View File

@ -221,7 +221,6 @@ private:
}
void prune(float threshold = 0.f) {
size_t i = 0;
for(auto& probs : data_) {
std::vector<std::pair<float, WordIndex>> sorter;
for(auto& it : probs)
@ -237,8 +236,6 @@ private:
else
break;
}
++i;
}
}

View File

@ -130,7 +130,6 @@ private:
int totalSize = (int)graphs_[0]->params()->vals()->size();
int shardSize = (int)ceil(totalSize / (float)graphs_.size());
int pos = 0;
for(auto graph : graphs_) {
int __size__ = std::min(shardSize, totalSize);
@ -145,7 +144,6 @@ private:
tmpTensors_.push_back(tmp);
// move to next shard
pos += __size__;
totalSize -= __size__;
}
}