Skip to content

Commit 9ead746

Browse files
TEST/COMMON: Change int to size_t for counters
1 parent 73bb1c1 commit 9ead746

2 files changed

Lines changed: 6 additions & 6 deletions

File tree

test/gtest/common/test.cc

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,8 @@ std::vector<std::string> test_base::m_errors;
2222
std::vector<std::string> test_base::m_warnings;
2323
std::vector<std::string> test_base::m_first_warns_and_errors;
2424
std::set<int> test_base::m_prev_open_fds;
25-
int test_base::m_consecutive_fd_increases = 0;
26-
int test_base::m_total_fd_increases = 0;
25+
size_t test_base::m_consecutive_fd_increases = 0;
26+
size_t test_base::m_total_fd_increases = 0;
2727

2828
test_base::test_base() :
2929
m_state(NEW),
@@ -81,8 +81,8 @@ void test_base::check_fd_leaks()
8181

8282
if (!m_prev_open_fds.empty()) {
8383
std::stringstream ss;
84-
int num_unexpected = 0;
85-
int num_whitelisted = 0;
84+
size_t num_unexpected = 0;
85+
size_t num_whitelisted = 0;
8686

8787
for (const int fd : open_fds) {
8888
if (m_prev_open_fds.find(fd) == m_prev_open_fds.end()) {

test/gtest/common/test.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -174,8 +174,8 @@ class test_base {
174174
unsigned m_num_log_handlers_before;
175175

176176
static std::set<int> m_prev_open_fds;
177-
static int m_consecutive_fd_increases;
178-
static int m_total_fd_increases;
177+
static size_t m_consecutive_fd_increases;
178+
static size_t m_total_fd_increases;
179179
static pthread_mutex_t m_logger_mutex;
180180
static unsigned m_total_errors;
181181
static unsigned m_total_warnings;

0 commit comments

Comments
 (0)