Skip to content
Snippets Groups Projects
Commit 403f5775 authored by Olivier BICHLER's avatar Olivier BICHLER
Browse files

Fixed minor issues

parent f80511fb
No related branches found
No related tags found
No related merge requests found
...@@ -20,8 +20,7 @@ namespace Aidge { ...@@ -20,8 +20,7 @@ namespace Aidge {
// The code snippet below is licensed under CC0 1.0. // The code snippet below is licensed under CC0 1.0.
template<typename ... Args> template<typename ... Args>
std::string stringFormat(const std::string& format, Args... args) { std::string stringFormat(const std::string& format, Args... args) {
#if defined(__clang__) #if defined(__clang__) || defined(__GNUC__) || defined(__GNUG__)
#elif defined(__GNUC__) || defined(__GNUG__)
// Disable security warning on GCC // Disable security warning on GCC
#pragma GCC diagnostic push #pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wformat-security" #pragma GCC diagnostic ignored "-Wformat-security"
...@@ -39,8 +38,7 @@ std::string stringFormat(const std::string& format, Args... args) { ...@@ -39,8 +38,7 @@ std::string stringFormat(const std::string& format, Args... args) {
std::unique_ptr<char[]> buf(new char[size]); std::unique_ptr<char[]> buf(new char[size]);
std::snprintf(buf.get(), size, format.c_str(), args...); std::snprintf(buf.get(), size, format.c_str(), args...);
return std::string(buf.get(), buf.get() + size - 1); // We don't want the '\0' inside return std::string(buf.get(), buf.get() + size - 1); // We don't want the '\0' inside
#if defined(__clang__) #if defined(__clang__) || defined(__GNUC__) || defined(__GNUG__)
#elif defined(__GNUC__) || defined(__GNUG__)
#pragma GCC diagnostic pop #pragma GCC diagnostic pop
#elif defined(_MSC_VER) #elif defined(_MSC_VER)
#pragma warning(pop) #pragma warning(pop)
......
...@@ -283,7 +283,7 @@ void Aidge::SequentialScheduler::forward(bool forwardDims, bool verbose) { ...@@ -283,7 +283,7 @@ void Aidge::SequentialScheduler::forward(bool forwardDims, bool verbose) {
void Aidge::SequentialScheduler::saveSchedulingDiagram(const std::string& fileName) const { void Aidge::SequentialScheduler::saveSchedulingDiagram(const std::string& fileName) const {
FILE* fp = std::fopen((fileName + ".mmd").c_str(), "w"); FILE* fp = std::fopen((fileName + ".mmd").c_str(), "w");
std::fprintf(fp, "gantt\ndateFormat x\naxisFormat %%Q ms\n\n"); std::fprintf(fp, "gantt\ndateFormat x\naxisFormat %%Q µs\n\n");
if (!mScheduling.empty()) { if (!mScheduling.empty()) {
std::map<std::shared_ptr<Node>, std::string> namePtrTable = getNodesName(true); std::map<std::shared_ptr<Node>, std::string> namePtrTable = getNodesName(true);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment