From 1db9030a98cc0f668d66b05cd15a3860acb4a5b8 Mon Sep 17 00:00:00 2001 From: Date Huang Date: Sun, 15 Dec 2024 20:46:38 +0800 Subject: [PATCH] spdlog: cast the type to std::int32_t to avoid spdlog error Signed-off-by: Date Huang --- raw_disk_io.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/raw_disk_io.cpp b/raw_disk_io.cpp index 4185b24..212f1b2 100644 --- a/raw_disk_io.cpp +++ b/raw_disk_io.cpp @@ -65,7 +65,7 @@ class partition_storage partition_offset += file_slice.offset; } catch (const std::exception &e) { SPDLOG_CRITICAL("failed to parse file_name({}) at ({}): {}", - file_name, file_index, e.what()); + file_name, static_cast(file_index), e.what()); error.file(file_index); error.ec = libtorrent::errors::parse_failed; error.operation = libtorrent::operation_t::file_read; @@ -98,7 +98,7 @@ class partition_storage partition_offset += file_slice.offset; } catch (const std::exception &e) { SPDLOG_CRITICAL("failed to parse file_name({}) at ({}): {}", - file_name, file_index, e.what()); + file_name, static_cast(file_index), e.what()); error.file(file_index); error.ec = libtorrent::errors::parse_failed; error.operation = libtorrent::operation_t::file_write;