aboutsummaryrefslogtreecommitdiffstats
path: root/executor
diff options
context:
space:
mode:
authorAlexander Egorenkov <eaibmz@gmail.com>2024-06-12 12:59:26 +0200
committerAleksandr Nogikh <nogikh@google.com>2024-06-13 13:03:06 +0000
commita9616ff57d4ef2794b54e02c26315c739ca8bc85 (patch)
treed56e5ead50d7d102f87e9bbc0e21d0497ce163a4 /executor
parentc22476192540e899f6f281171e6a93a3846fc891 (diff)
executor: fix compiler warnings in 32-bit mode
executor/executor.cc: In function ‘uint64 read_input(uint8**, bool)’: executor/executor.cc:1487:59: error: format ‘%zu’ expects argument of type ‘size_t’, but argument 3 has type ‘int’ [-Werror=format=] executor/executor.cc:1495:67: error: format ‘%zu’ expects argument of type ‘size_t’, but argument 3 has type ‘int’ [-Werror=format=] Signed-off-by: Alexander Egorenkov <eaibmz@gmail.com>
Diffstat (limited to 'executor')
-rw-r--r--executor/executor.cc4
1 files changed, 2 insertions, 2 deletions
diff --git a/executor/executor.cc b/executor/executor.cc
index 0d08f562b..cb2245c69 100644
--- a/executor/executor.cc
+++ b/executor/executor.cc
@@ -1484,7 +1484,7 @@ uint64 read_input(uint8** input_posp, bool peek)
for (int i = 0;; i++, shift += 7) {
const int maxLen = 10;
if (i == maxLen)
- failmsg("varint overflow", "pos=%zu", *input_posp - input_data);
+ failmsg("varint overflow", "pos=%zu", (size_t)(*input_posp - input_data));
if (input_pos >= input_data + kMaxInput)
failmsg("input command overflows input", "pos=%p: [%p:%p)",
input_pos, input_data, input_data + kMaxInput);
@@ -1492,7 +1492,7 @@ uint64 read_input(uint8** input_posp, bool peek)
v |= uint64(b & 0x7f) << shift;
if (b < 0x80) {
if (i == maxLen - 1 && b > 1)
- failmsg("varint overflow", "pos=%zu", *input_posp - input_data);
+ failmsg("varint overflow", "pos=%zu", (size_t)(*input_posp - input_data));
break;
}
}