diff options
Diffstat (limited to 'document')
-rw-r--r-- | document/src/tests/base/documentid_benchmark.cpp | 3 | ||||
-rw-r--r-- | document/src/vespa/document/bucket/bucketselector.cpp | 2 | ||||
-rw-r--r-- | document/src/vespa/document/fieldvalue/document.cpp | 2 |
3 files changed, 4 insertions, 3 deletions
diff --git a/document/src/tests/base/documentid_benchmark.cpp b/document/src/tests/base/documentid_benchmark.cpp index 632c47507bd..7cfc880ba22 100644 --- a/document/src/tests/base/documentid_benchmark.cpp +++ b/document/src/tests/base/documentid_benchmark.cpp @@ -1,5 +1,6 @@ // Copyright 2017 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. #include <vespa/document/base/documentid.h> +#include <cinttypes> using namespace document; @@ -10,7 +11,7 @@ int main(int argc, char *argv[]) } vespalib::string s(argv[1]); uint64_t n = strtoul(argv[2], NULL, 0); - printf("Creating documentid '%s' %ld times\n", s.c_str(), n); + printf("Creating documentid '%s' %" PRIu64 " times\n", s.c_str(), n); printf("sizeof(IdString)=%ld, sizeof(IdIdString)=%ld\n", sizeof(IdString), sizeof(IdIdString)); for (uint64_t i=0; i < n; i++) { IdString::UP id = IdString::createIdString(s); diff --git a/document/src/vespa/document/bucket/bucketselector.cpp b/document/src/vespa/document/bucket/bucketselector.cpp index ceb231a483c..c4e0bc06a3d 100644 --- a/document/src/vespa/document/bucket/bucketselector.cpp +++ b/document/src/vespa/document/bucket/bucketselector.cpp @@ -96,7 +96,7 @@ using namespace document::select; const IntegerValueNode* val( dynamic_cast<const IntegerValueNode*>(&valnode)); if (!val) return; - UserDocIdString id(vespalib::make_string("userdoc::%lu:", val->getValue())); + UserDocIdString id(vespalib::make_string("userdoc::%" PRIu64 ":", val->getValue())); _buckets.push_back(BucketId(32, id.getLocation())); _unknown = false; } else if (node.getType() == IdValueNode::GROUP) { diff --git a/document/src/vespa/document/fieldvalue/document.cpp b/document/src/vespa/document/fieldvalue/document.cpp index f9107d6e984..1bcee490378 100644 --- a/document/src/vespa/document/fieldvalue/document.cpp +++ b/document/src/vespa/document/fieldvalue/document.cpp @@ -336,7 +336,7 @@ void mainDocumentError(int64_t len) { } void notEnoughDocumentError(int32_t len, int64_t remaining) { - throw DeserializeException(make_string( "Buffer said document length is %i bytes, but only %li bytes remain in buffer", len, remaining)); + throw DeserializeException(make_string( "Buffer said document length is %d bytes, but only %" PRId64 " bytes remain in buffer", len, remaining)); } } |