diff options
author | Tor Egge <Tor.Egge@broadpark.no> | 2020-01-07 20:39:25 +0100 |
---|---|---|
committer | Tor Egge <Tor.Egge@broadpark.no> | 2020-01-07 20:39:25 +0100 |
commit | ce633f37f0e3d4b141ca023f2d8e1b3d0e20265c (patch) | |
tree | 147d0d5e590ab36e09cfa09e40916e06865e2094 /eval | |
parent | 812324f02d0ed2ec08bf6b71acce5df766a40f53 (diff) |
Fix format strings.
Diffstat (limited to 'eval')
-rw-r--r-- | eval/src/tests/eval/compile_cache/compile_cache_test.cpp | 4 | ||||
-rw-r--r-- | eval/src/vespa/eval/eval/function.cpp | 2 | ||||
-rw-r--r-- | eval/src/vespa/eval/eval/tensor_function.cpp | 4 |
3 files changed, 5 insertions, 5 deletions
diff --git a/eval/src/tests/eval/compile_cache/compile_cache_test.cpp b/eval/src/tests/eval/compile_cache/compile_cache_test.cpp index 63fedb07d14..5176a4b3e94 100644 --- a/eval/src/tests/eval/compile_cache/compile_cache_test.cpp +++ b/eval/src/tests/eval/compile_cache/compile_cache_test.cpp @@ -278,7 +278,7 @@ TEST_F("compile sequentially, then run all conformance tests", test::EvalSpec()) auto t2 = steady_clock::now(); test.verify(); auto t3 = steady_clock::now(); - fprintf(stderr, "sequential (run %zu): setup: %zu ms, wait: %zu ms, verify: %zu us, total: %zu ms\n", + fprintf(stderr, "sequential (run %zu): setup: %" PRIu64 " ms, wait: %" PRIu64 " ms, verify: %" PRIu64 " us, total: %" PRIu64 " ms\n", i, count_ms(t1 - t0), count_ms(t2 - t1), count_us(t3 - t2), count_ms(t3 - t0)); } } @@ -299,7 +299,7 @@ TEST_F("compile concurrently (8 threads), then run all conformance tests", test: auto t2 = steady_clock::now(); test.verify(); auto t3 = steady_clock::now(); - fprintf(stderr, "concurrent (run %zu): setup: %zu ms, wait: %zu ms, verify: %zu us, total: %zu ms\n", + fprintf(stderr, "concurrent (run %zu): setup: %" PRIu64 " ms, wait: %" PRIu64 " ms, verify: %" PRIu64 " us, total: %" PRIu64 " ms\n", i, count_ms(t1 - t0), count_ms(t2 - t1), count_us(t3 - t2), count_ms(t3 - t0)); } } diff --git a/eval/src/vespa/eval/eval/function.cpp b/eval/src/vespa/eval/eval/function.cpp index 3d6e66acf04..03e0ae5c0a2 100644 --- a/eval/src/vespa/eval/eval/function.cpp +++ b/eval/src/vespa/eval/eval/function.cpp @@ -822,7 +822,7 @@ void parse_tensor_peek(ParseContext &ctx) { if (ctx.get() == '(') { auto expr = get_expression(ctx); if (auto num = nodes::as<nodes::Number>(*expr)) { - peek_spec.emplace(dim_name, make_string("%ld", int64_t(round(num->value())))); + peek_spec.emplace(dim_name, make_string("%" PRId64, int64_t(round(num->value())))); } else { peek_spec.emplace(dim_name, std::move(expr)); } diff --git a/eval/src/vespa/eval/eval/tensor_function.cpp b/eval/src/vespa/eval/eval/tensor_function.cpp index 9e429757982..228a723e86a 100644 --- a/eval/src/vespa/eval/eval/tensor_function.cpp +++ b/eval/src/vespa/eval/eval/tensor_function.cpp @@ -175,7 +175,7 @@ void op_tensor_peek(State &state, uint64_t param) { assert(dim_idx != ValueType::Dimension::npos); const auto ¶m_dim = self.param_type().dimensions()[dim_idx]; if (param_dim.is_mapped()) { - addr.emplace(pos->first, vespalib::make_string("%ld", int64_t(index))); + addr.emplace(pos->first, vespalib::make_string("%" PRId64, int64_t(index))); } else { addr.emplace(pos->first, size_t(index)); } @@ -394,7 +394,7 @@ Peek::visit_children(vespalib::ObjectVisitor &visitor) const if (label.is_mapped()) { ::visit(visitor, dim.first, label.name); } else { - ::visit(visitor, dim.first, label.index); + ::visit(visitor, dim.first, static_cast<int64_t>(label.index)); } }, [&](const Child &child) { |