Skip to content

Commit 7fdf5c8

Browse files
authored
Merge pull request #3645 from jacquesqiao/reduce-warning
reduce some compile warning
2 parents ab6b3c4 + 72d2918 commit 7fdf5c8

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

paddle/gserver/gradientmachines/RecurrentGradientMachine.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1399,8 +1399,8 @@ void RecurrentGradientMachine::createDataOutlinkCopySizeInfo(
13991399
getBeamSize() > 1 ? finalPaths_.size() : finalPaths_[0].size());
14001400
int* starts = inputSeqStartPos->getMutableData(false);
14011401
int seqId = 0;
1402-
for (int i = 0; i < finalPaths_.size(); ++i) {
1403-
for (int j = 0; j < finalPaths_[i].size(); ++j) {
1402+
for (size_t i = 0; i < finalPaths_.size(); ++i) {
1403+
for (size_t j = 0; j < finalPaths_[i].size(); ++j) {
14041404
copySize[seqId] = getBeamSize() > 1 ? starts[i + 1] - starts[i]
14051405
: starts[j + 1] - starts[j];
14061406
batchMachineStartPos_[seqId + 1] =

paddle/operators/net_op_test.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ TEST(NetOp, Clone) {
7979
ASSERT_NE(new_net_op, nullptr);
8080
ASSERT_TRUE(new_net_op->IsNetOp());
8181
auto* new_net = static_cast<NetOp*>(new_net_op.get());
82-
ASSERT_EQ(2, new_net->ops_.size());
82+
ASSERT_EQ(2UL, new_net->ops_.size());
8383
ASSERT_EQ(new_net->ops_[0]->Type(), "empty");
8484
ASSERT_EQ(new_net->ops_[1]->Type(), "empty2");
8585
}

0 commit comments

Comments
 (0)