Skip to content

Commit 0b3f7ef

Browse files
committed
fix: update size type to int63_t and initialize struct stat in UABPackager and Builder
Changed the size type from int to int64_t in both Builder and UABPackager to ensure proper handling of larger values. Additionally, initialized struct stat variables to improve code clarity and maintainability.
1 parent 29be029 commit 0b3f7ef

2 files changed

Lines changed: 5 additions & 3 deletions

File tree

libs/linglong/src/linglong/builder/linglong_builder.cpp

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1371,7 +1371,7 @@ utils::error::Result<void> Builder::commitToLocalRepo() noexcept
13711371
if (!ret) {
13721372
return LINGLONG_ERR(ret);
13731373
}
1374-
info.size = static_cast<int>(*ret);
1374+
info.size = static_cast<int64_t>(*ret);
13751375

13761376
QFile infoFile{ moduleOutput.filePath("info.json") };
13771377
if (!infoFile.open(QIODevice::WriteOnly | QIODevice::Truncate)) {
@@ -2248,7 +2248,9 @@ utils::error::Result<bool> Builder::generateDependsScript() noexcept
22482248

22492249
void Builder::takeTerminalForeground()
22502250
{
2251-
struct sigaction sa{};
2251+
struct sigaction sa
2252+
{
2253+
};
22522254

22532255
sa.sa_handler = SIG_IGN;
22542256
sigaction(SIGTTOU, &sa, NULL);

libs/linglong/src/linglong/package/uab_packager.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -702,7 +702,7 @@ utils::error::Result<void> UABPackager::prepareBundle(const QDir &bundleDir, boo
702702
if (!newSize) {
703703
return LINGLONG_ERR(newSize);
704704
}
705-
info.size = static_cast<int>(*newSize);
705+
info.size = static_cast<int64_t>(*newSize);
706706

707707
stream << nlohmann::json(info).dump();
708708
layerInfoRef.info = info;

0 commit comments

Comments
 (0)