From ff23d7e43f6f3024f87ab7161d295135def457d9 Mon Sep 17 00:00:00 2001 From: AlexandreRouma Date: Mon, 29 Jan 2024 01:40:20 +0100 Subject: [PATCH] fix warnings --- core/libcorrect/src/convolutional/history_buffer.c | 2 +- misc_modules/frequency_manager/src/main.cpp | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/core/libcorrect/src/convolutional/history_buffer.c b/core/libcorrect/src/convolutional/history_buffer.c index f54ffdd9..52543b09 100644 --- a/core/libcorrect/src/convolutional/history_buffer.c +++ b/core/libcorrect/src/convolutional/history_buffer.c @@ -45,7 +45,7 @@ uint8_t *history_buffer_get_slice(history_buffer *buf) { return buf->history[buf shift_register_t history_buffer_search(history_buffer *buf, const distance_t *distances, unsigned int search_every) { - shift_register_t bestpath; + shift_register_t bestpath = 0; distance_t leasterror = USHRT_MAX; // search for a state with the least error for (shift_register_t state = 0; state < buf->num_states; state += search_every) { diff --git a/misc_modules/frequency_manager/src/main.cpp b/misc_modules/frequency_manager/src/main.cpp index 90d5fb69..f50f8bfd 100644 --- a/misc_modules/frequency_manager/src/main.cpp +++ b/misc_modules/frequency_manager/src/main.cpp @@ -531,7 +531,7 @@ private: ImGui::TableSetColumnIndex(0); if (ImGui::Button(("Import##_freq_mgr_imp_" + _this->name).c_str(), ImVec2(ImGui::GetContentRegionAvail().x, 0)) && !_this->importOpen) { _this->importOpen = true; - _this->importDialog = new pfd::open_file("Import bookmarks", "", { "JSON Files (*.json)", "*.json", "All Files", "*" }, true); + _this->importDialog = new pfd::open_file("Import bookmarks", "", { "JSON Files (*.json)", "*.json", "All Files", "*" }, pfd::opt::multiselect); } ImGui::TableSetColumnIndex(1); @@ -544,7 +544,7 @@ private: } config.release(); _this->exportOpen = true; - _this->exportDialog = new pfd::save_file("Export bookmarks", "", { "JSON Files (*.json)", "*.json", "All Files", "*" }, true); + _this->exportDialog = new pfd::save_file("Export bookmarks", "", { "JSON Files (*.json)", "*.json", "All Files", "*" }); } if (selectedNames.size() == 0 && _this->selectedListName != "") { style::endDisabled(); } ImGui::EndTable(); @@ -787,7 +787,7 @@ private: void exportBookmarks(std::string path) { std::ofstream fs(path); - exportedBookmarks >> fs; + fs << exportedBookmarks; fs.close(); }