diff options
author | Maksim Denisov <denisov.maksim@huawei.com> | 2024-10-01 12:23:17 +0200 |
---|---|---|
committer | Maksim Denisov <denisov.maksim@huawei.com> | 2024-10-07 13:37:39 +0200 |
commit | 7df9944604e2ef92abce20c00ea265793b151261 (patch) | |
tree | df758ede71200d463db1b2c05dd03e8cd0a76765 /src/buildtool/main/archive.cpp | |
parent | f56805ddde51ffcfdd6123300b6c049764a86980 (diff) | |
download | justbuild-7df9944604e2ef92abce20c00ea265793b151261.tar.gz |
Enable bugprone-narrowing-conversions check
Diffstat (limited to 'src/buildtool/main/archive.cpp')
-rw-r--r-- | src/buildtool/main/archive.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/buildtool/main/archive.cpp b/src/buildtool/main/archive.cpp index d4e720b2..13d377ca 100644 --- a/src/buildtool/main/archive.cpp +++ b/src/buildtool/main/archive.cpp @@ -74,7 +74,8 @@ auto add_to_archive(HashFunction::Type hash_type, std::unique_ptr<archive_entry, decltype(&archive_entry_cleanup)> entry{archive_entry_new(), archive_entry_cleanup}; archive_entry_set_pathname(entry.get(), location.string().c_str()); - archive_entry_set_size(entry.get(), payload->size()); + archive_entry_set_size(entry.get(), + static_cast<la_int64_t>(payload->size())); archive_entry_set_filetype(entry.get(), AE_IFREG); archive_entry_set_perm(entry.get(), artifact.type == ObjectType::Executable @@ -88,7 +89,8 @@ auto add_to_archive(HashFunction::Type hash_type, std::unique_ptr<archive_entry, decltype(&archive_entry_cleanup)> entry{archive_entry_new(), archive_entry_cleanup}; archive_entry_set_pathname(entry.get(), location.string().c_str()); - archive_entry_set_size(entry.get(), payload->size()); + archive_entry_set_size(entry.get(), + static_cast<la_int64_t>(payload->size())); archive_entry_set_filetype(entry.get(), AE_IFLNK); archive_entry_set_symlink(entry.get(), payload->c_str()); archive_entry_set_perm(entry.get(), kDefaultPerm); |