Fix uint64_t vs size_t when compiling with -m32

This commit is contained in:
Nigel Tao committed 2021-01-08 23:07:07 +11:00
1 parent c86add25f7
commit 2b17cf72ca
14 files changed
+172 -164

No files matched your search

+2 -2
View File
@@ -135,7 +135,7 @@ DecodeCbor(DecodeCborCallbacks& callbacks,
goto done;
}
uint8_t* token_ptr = io_buf->data.ptr + cursor_index;
cursor_index += token_len;
cursor_index += static_cast<size_t>(token_len);
// 2. Process that token.
@@ -196,7 +196,7 @@ DecodeCbor(DecodeCborCallbacks& callbacks,
WUFFS_BASE__TOKEN__VBD__STRING__CONVERT_1_DST_1_SRC_COPY) {
const char* ptr = // Convert from (uint8_t*).
static_cast<const char*>(static_cast<void*>(token_ptr));
str.append(ptr, token_len);
str.append(ptr, static_cast<size_t>(token_len));
} else {
goto fail;
}