Fix warnings.
GitOrigin-RevId: 1b76215c3fdfd5a05581ab0122704b4e422de410
This commit is contained in:
parent
2f90c47d03
commit
31333b5b7f
@ -98,7 +98,8 @@ Status scan_fs(CallbackT &&callback) {
|
|||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
auto files_dir = get_files_dir(file_type);
|
auto files_dir = get_files_dir(file_type);
|
||||||
td::walk_path(files_dir, [&](CSlice path, bool is_dir) {
|
td::walk_path(files_dir,
|
||||||
|
[&](CSlice path, bool is_dir) {
|
||||||
if (is_dir) {
|
if (is_dir) {
|
||||||
// TODO: skip subdirs
|
// TODO: skip subdirs
|
||||||
return;
|
return;
|
||||||
@ -116,7 +117,8 @@ Status scan_fs(CallbackT &&callback) {
|
|||||||
info.atime_nsec = stat.atime_nsec_;
|
info.atime_nsec = stat.atime_nsec_;
|
||||||
info.mtime_nsec = stat.mtime_nsec_;
|
info.mtime_nsec = stat.mtime_nsec_;
|
||||||
callback(info);
|
callback(info);
|
||||||
});
|
})
|
||||||
|
.ignore();
|
||||||
}
|
}
|
||||||
return Status::OK();
|
return Status::OK();
|
||||||
}
|
}
|
||||||
|
@ -438,7 +438,7 @@ TEST(BigNum, from_decimal) {
|
|||||||
|
|
||||||
static void test_get_ipv4(uint32 ip) {
|
static void test_get_ipv4(uint32 ip) {
|
||||||
td::IPAddress ip_address;
|
td::IPAddress ip_address;
|
||||||
ip_address.init_ipv4_port(td::IPAddress::ipv4_to_str(ip), 80);
|
ip_address.init_ipv4_port(td::IPAddress::ipv4_to_str(ip), 80).ensure();
|
||||||
ASSERT_EQ(ip_address.get_ipv4(), ip);
|
ASSERT_EQ(ip_address.get_ipv4(), ip);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -29,12 +29,14 @@ TEST(Port, files) {
|
|||||||
int cnt = 0;
|
int cnt = 0;
|
||||||
const int ITER_COUNT = 1000;
|
const int ITER_COUNT = 1000;
|
||||||
for (int i = 0; i < ITER_COUNT; i++) {
|
for (int i = 0; i < ITER_COUNT; i++) {
|
||||||
walk_path(main_dir, [&](CSlice name, bool is_directory) {
|
walk_path(main_dir,
|
||||||
|
[&](CSlice name, bool is_directory) {
|
||||||
if (!is_directory) {
|
if (!is_directory) {
|
||||||
ASSERT_EQ(fd_path, name);
|
ASSERT_EQ(fd_path, name);
|
||||||
}
|
}
|
||||||
cnt++;
|
cnt++;
|
||||||
});
|
})
|
||||||
|
.ensure();
|
||||||
}
|
}
|
||||||
ASSERT_EQ(4 * ITER_COUNT, cnt);
|
ASSERT_EQ(4 * ITER_COUNT, cnt);
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user