From 7d848ab3a54c7fdd414c8cc5d8f251c3991fc41e Mon Sep 17 00:00:00 2001 From: kamiyadm Date: Wed, 6 Nov 2024 17:59:15 +0800 Subject: [PATCH] fix: some buildflag has uncertain value Fully initialize those options. Log: --- apps/ll-cli/src/main.cpp | 16 ++++++++++++++-- .../src/linglong/builder/linglong_builder.h | 10 +++++++--- 2 files changed, 21 insertions(+), 5 deletions(-) diff --git a/apps/ll-cli/src/main.cpp b/apps/ll-cli/src/main.cpp index f0f7e8d5..84948ca4 100644 --- a/apps/ll-cli/src/main.cpp +++ b/apps/ll-cli/src/main.cpp @@ -214,8 +214,20 @@ You can report bugs to the linyaps team under this project: https://github.com/O "" }; - CliOptions options; - options.type = "app"; + CliOptions options = CliOptions{ .filePath = "", + .fileUrl = "", + .workDir = "", + .appid = "", + .instance = "", + .module = "", + .type = "app", + .repoName = "", + .repoUrl = "", + .commands = {}, + .showDevel = false, + .showUpgradeList = false, + .forceOpt = false, + .confirmOpt = false }; // groups std::string CliBuildInGroup = _("Managing installed applications and runtimes"); diff --git a/libs/linglong/src/linglong/builder/linglong_builder.h b/libs/linglong/src/linglong/builder/linglong_builder.h index 05d7e703..87428982 100644 --- a/libs/linglong/src/linglong/builder/linglong_builder.h +++ b/libs/linglong/src/linglong/builder/linglong_builder.h @@ -27,9 +27,13 @@ struct BuilderBuildOptions { // 兼容选项,在制作runtime时构建全量develop, 以兼容旧版本linglong-builder使用 // TODO 后续版本删除该选项 - bool fullDevelop; - bool skipFetchSource, skipPullDepend, skipRunContainer, skipCommitOutput, skipCheckOutput, - skipStripSymbols; + bool fullDevelop {false}; + bool skipFetchSource {false}; + bool skipPullDepend {false}; + bool skipRunContainer {false}; + bool skipCommitOutput {false}; + bool skipCheckOutput {false}; + bool skipStripSymbols {false}; }; class Builder