diff --git a/src/api-driver/structs.cpp b/src/api-driver/structs.cpp index c029bb9..3cad21a 100644 --- a/src/api-driver/structs.cpp +++ b/src/api-driver/structs.cpp @@ -569,7 +569,7 @@ void api_driver::obj::TerminalRxTxSettings::storeMainSettings(proxy::CpProxy &cp #endif } - +#if defined(MODEM_IS_SCPC) || defined(MODEM_IS_SHPS) struct ModcodDef_t {const char* modulation; const char* speed;}; const static ModcodDef_t ModcodDefs[] = { {.modulation = "dummy", .speed = "0"}, @@ -637,7 +637,7 @@ static uint32_t buildModcodFromJson(const nlohmann::json& data, uint32_t modcod, } return (modcod << 2)| (isNormalFrame ? 0 : 2) | (isPilots ? 1 : 0); } - +#endif void api_driver::obj::TerminalRxTxSettings::updateMainSettings(const nlohmann::json &data) { // для модулятора @@ -1011,8 +1011,8 @@ std::string api_driver::obj::TerminalManagerLogs::loadPreview() { // Читаем файл с конца для эффективности file.seekg(0, std::ios::end); - size_t size = file.tellg(); - std::string content(size, '\0'); + auto size = file.tellg(); + std::string content(static_cast(size), '\0'); file.seekg(0); file.read(&content[0], size); @@ -1041,7 +1041,7 @@ std::string api_driver::obj::TerminalManagerLogs::loadPreview() { } std::string api_driver::obj::TerminalManagerLogs::loadPreviewWithFilter(const std::string& logLevel) { - return "Logs filtering not supported yet..."; + return "Logs level " + logLevel + " filtering not supported yet..."; } void api_driver::obj::TerminalManagerLogs::loadFullLog(std::vector& destData) { @@ -1052,11 +1052,11 @@ void api_driver::obj::TerminalManagerLogs::loadFullLog(std::vector& destDa std::ifstream stream(logsFileDir + file, std::ios::binary | std::ios::ate); if (!stream) continue; - std::streamsize size = stream.tellg(); + auto size = stream.tellg(); stream.seekg(0, std::ios::beg); size_t currentSize = destData.size(); - destData.resize(currentSize + size); + destData.resize(currentSize + static_cast(size)); stream.read(destData.data() + currentSize, size); } } diff --git a/src/main.cpp b/src/main.cpp index 2ac5956..c03e2c0 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -81,7 +81,7 @@ class ServerResources { std::string cmd(UPGRADE_COMMAND); cmd += " "; cmd += FIRMWARE_LOCATION; - system(cmd.c_str()); + std::ignore = system(cmd.c_str()); cp.setDmaDebug("save_config", ""); }); } @@ -479,7 +479,7 @@ public: const std::string result = R"({"status":"ok"})"; rep.content.insert(rep.content.end(), result.c_str(), result.c_str() + result.size()); this->upgradeOrRebootRunning = true; - system(REBOOT_COMMAND); + std::ignore = system(REBOOT_COMMAND); })); s.resources.emplace_back(std::make_unique("/api/resetSettings", this->auth, http::auth::User::EDIT_SETTINGS, [this](const auto& req, auto& rep) { if (req.method != "POST") { @@ -491,7 +491,7 @@ public: const std::string result = R"({"status":"ok"})"; rep.content.insert(rep.content.end(), result.c_str(), result.c_str() + result.size()); api->resetDefaultSettings(); - system(REBOOT_COMMAND); + std::ignore = system(REBOOT_COMMAND); })); s.resources.emplace_back(std::make_unique("/api/firmwareUpdate", this->auth, http::auth::User::UPDATE_FIRMWARE, [this](const auto& req, auto& rep) {