aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorN. Engelhardt <nak@yosyshq.com>2022-08-25 12:19:38 +0200
committerN. Engelhardt <nakengelhardt@gmail.com>2022-08-25 13:36:51 +0200
commite3eb114e7549eb6381c6b94f7b36f42b70c122d3 (patch)
treebd1553ae98d14519499a0797c71dc431cf906a3a
parent7e92e80741890e87bf50817495fb2c808b083617 (diff)
downloadyosys-e3eb114e7549eb6381c6b94f7b36f42b70c122d3.tar.gz
yosys-e3eb114e7549eb6381c6b94f7b36f42b70c122d3.tar.bz2
yosys-e3eb114e7549eb6381c6b94f7b36f42b70c122d3.zip
use inttypes format specifiers
-rw-r--r--kernel/driver.cc6
1 files changed, 3 insertions, 3 deletions
diff --git a/kernel/driver.cc b/kernel/driver.cc
index d25b5faa8..436fda48c 100644
--- a/kernel/driver.cc
+++ b/kernel/driver.cc
@@ -33,6 +33,7 @@
#include <string.h>
#include <limits.h>
#include <errno.h>
+#include <inttypes.h>
#if defined (__linux__) || defined(__FreeBSD__)
# include <sys/resource.h>
@@ -686,7 +687,7 @@ int main(int argc, char **argv)
fprintf(f, "{\n");
fprintf(f, " \"generator\": \"%s\",\n", yosys_version_str);
- fprintf(f, " \"total_ns\": %lu,\n", total_ns);
+ fprintf(f, " \"total_ns\": %" PRIu64 ",\n", total_ns);
fprintf(f, " \"passes\": {");
bool first = true;
@@ -694,7 +695,7 @@ int main(int argc, char **argv)
if (!first)
fprintf(f, ",");
fprintf(f, "\n \"%s\": {\n", std::get<2>(*it).c_str());
- fprintf(f, " \"runtime_ns\": %lu,\n", std::get<0>(*it));
+ fprintf(f, " \"runtime_ns\": %" PRIu64 ",\n", std::get<0>(*it));
fprintf(f, " \"num_calls\": %u\n", std::get<1>(*it));
fprintf(f, " }");
first = false;
@@ -751,4 +752,3 @@ int main(int argc, char **argv)
}
#endif /* EMSCRIPTEN */
-