提交 7fdf5c83 编写于 作者: Q Qiao Longfei 提交者: GitHub

Merge pull request #3645 from jacquesqiao/reduce-warning

reduce some compile warning
...@@ -1399,8 +1399,8 @@ void RecurrentGradientMachine::createDataOutlinkCopySizeInfo( ...@@ -1399,8 +1399,8 @@ void RecurrentGradientMachine::createDataOutlinkCopySizeInfo(
getBeamSize() > 1 ? finalPaths_.size() : finalPaths_[0].size()); getBeamSize() > 1 ? finalPaths_.size() : finalPaths_[0].size());
int* starts = inputSeqStartPos->getMutableData(false); int* starts = inputSeqStartPos->getMutableData(false);
int seqId = 0; int seqId = 0;
for (int i = 0; i < finalPaths_.size(); ++i) { for (size_t i = 0; i < finalPaths_.size(); ++i) {
for (int j = 0; j < finalPaths_[i].size(); ++j) { for (size_t j = 0; j < finalPaths_[i].size(); ++j) {
copySize[seqId] = getBeamSize() > 1 ? starts[i + 1] - starts[i] copySize[seqId] = getBeamSize() > 1 ? starts[i + 1] - starts[i]
: starts[j + 1] - starts[j]; : starts[j + 1] - starts[j];
batchMachineStartPos_[seqId + 1] = batchMachineStartPos_[seqId + 1] =
......
...@@ -79,7 +79,7 @@ TEST(NetOp, Clone) { ...@@ -79,7 +79,7 @@ TEST(NetOp, Clone) {
ASSERT_NE(new_net_op, nullptr); ASSERT_NE(new_net_op, nullptr);
ASSERT_TRUE(new_net_op->IsNetOp()); ASSERT_TRUE(new_net_op->IsNetOp());
auto* new_net = static_cast<NetOp*>(new_net_op.get()); auto* new_net = static_cast<NetOp*>(new_net_op.get());
ASSERT_EQ(2, new_net->ops_.size()); ASSERT_EQ(2UL, new_net->ops_.size());
ASSERT_EQ(new_net->ops_[0]->Type(), "empty"); ASSERT_EQ(new_net->ops_[0]->Type(), "empty");
ASSERT_EQ(new_net->ops_[1]->Type(), "empty2"); ASSERT_EQ(new_net->ops_[1]->Type(), "empty2");
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册