Skip to content

Commit

Permalink
[#12150] docdb: Fix gcc9 compile
Browse files Browse the repository at this point in the history
Summary:
gcc9 compile currently fails with the following:

```
/-------------------------------------------------------------------------------
| COMPILATION FAILED
|-------------------------------------------------------------------------------
ent/src/yb/tools/yb-admin-test_ent.cc: In member function ‘virtual void yb::tools::XClusterAdminCliTest_Large_TestBootstrapProducerPerformance_Test::TestBody()’:
ent/src/yb/tools/yb-admin-test_ent.cc:1374:21: error: comparison of integer expressions of different signedness: ‘int’ and ‘std::vector<yb::client::TableHandle>::size_type’ {aka ‘long unsigned int’} [-Werror=sign-compare]
 1374 |   for (int i = 1; i < tables.size(); ++i) {
      |                   ~~^~~~~~~~~~~~~~~
cc1plus: all warnings being treated as errors

Input files:
  src/yb/tools/CMakeFiles/yb-admin-test_ent.dir/__/__/__/ent/src/yb/tools/yb-admin-test_ent.cc.o
  ent/src/yb/tools/yb-admin-test_ent.cc
Output file (from -o): src/yb/tools/CMakeFiles/yb-admin-test_ent.dir/__/__/__/ent/src/yb/tools/yb-admin-test_ent.cc.o
\-------------------------------------------------------------------------------
```

This diff fixes the compile error.

Test Plan: Jenkins: compile only

Reviewers: sergei, bogdan, nicolas

Reviewed By: nicolas

Subscribers: ybase

Differential Revision: https://phabricator.dev.yugabyte.com/D16521
  • Loading branch information
es1024 committed Apr 13, 2022
1 parent 13ebc86 commit cfe5beb
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion ent/src/yb/tools/yb-admin-test_ent.cc
Expand Up @@ -1371,7 +1371,7 @@ TEST_F(XClusterAdminCliTest_Large, TestBootstrapProducerPerformance) {
}

std::string table_ids = tables.at(0)->id();
for (int i = 1; i < tables.size(); ++i) {
for (size_t i = 1; i < tables.size(); ++i) {
table_ids += "," + tables.at(i)->id();
}

Expand Down

0 comments on commit cfe5beb

Please sign in to comment.