diff options
author | Joel Rosdahl <joel@rosdahl.net> | 2020-10-22 19:30:41 +0200 |
---|---|---|
committer | Joel Rosdahl <joel@rosdahl.net> | 2020-10-23 15:32:26 +0200 |
commit | 83b50b30711f36b84f2666a27db1cc92d8bf1d95 (patch) | |
tree | 95c388417ec52e7eb55fa1a16d56b62a63a74aa7 /src/MiniTrace.cpp | |
parent | 01929c5c0ba83e3544c6f81cfcb3e715663f0687 (diff) | |
download | ccache-83b50b30711f36b84f2666a27db1cc92d8bf1d95.tar.gz |
Detect errors in fmt::format format strings at compile time
See also 4413d842e23c6fa52ec411951a4ab442f42227de.
Diffstat (limited to 'src/MiniTrace.cpp')
-rw-r--r-- | src/MiniTrace.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/MiniTrace.cpp b/src/MiniTrace.cpp index 788d3160..bf17397b 100644 --- a/src/MiniTrace.cpp +++ b/src/MiniTrace.cpp @@ -24,6 +24,7 @@ # include "MiniTrace.hpp" # include "TemporaryFile.hpp" # include "Util.hpp" +# include "fmtmacros.hpp" # ifdef HAVE_SYS_TIME_H # include <sys/time.h> @@ -70,7 +71,7 @@ MiniTrace::MiniTrace(const ArgsInfo& args_info) m_tmp_trace_file = tmp_file.path; mtr_init(m_tmp_trace_file.c_str()); - MTR_INSTANT_C("", "", "time", fmt::format("{:f}", time_seconds()).c_str()); + MTR_INSTANT_C("", "", "time", FMT("{:f}", time_seconds()).c_str()); MTR_META_PROCESS_NAME("ccache"); MTR_START("program", "ccache", m_trace_id); } |