diff --git a/src/altera.cpp b/src/altera.cpp index 71feb21..22ac908 100644 --- a/src/altera.cpp +++ b/src/altera.cpp @@ -486,7 +486,7 @@ void Altera::max10_program(unsigned int offset) if (_flash_sectors.size() > 0) { const std::vector sectors = splitString(_flash_sectors, ','); update_sectors = 0; - for (const auto sector: sectors) { + for (const auto §or: sectors) { if (sector == "UFM1") update_sectors |= (1 << 0); else if (sector == "UFM0") diff --git a/src/common.cpp b/src/common.cpp index 6547913..c472b8a 100644 --- a/src/common.cpp +++ b/src/common.cpp @@ -6,8 +6,9 @@ #include "common.hpp" -#include #include +#include +#include /*! * \brief return shell environment variable value @@ -31,7 +32,7 @@ const std::vector splitString(const std::string& in, std::vector tokens; size_t start = 0, end = 0; - while ((end = in.find(',', start)) != std::string::npos) { + while ((end = in.find(delim, start)) != std::string::npos) { tokens.push_back(in.substr(start, end - start)); start = end + 1; } diff --git a/src/common.hpp b/src/common.hpp index 0ec85d1..ef6c93e 100644 --- a/src/common.hpp +++ b/src/common.hpp @@ -7,6 +7,7 @@ #define SRC_COMMON_HPP_ #include +#include /*! * \brief return shell environment variable value diff --git a/src/main.cpp b/src/main.cpp index 579cf52..3778608 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -142,7 +142,6 @@ int main(int argc, char **argv) printError("Error in parse arg step"); return EXIT_FAILURE; } - printf("sectors: %s\n", args.flash_sector.c_str()); if (args.is_list_command) { displaySupported(args);