From e3cf4c672e2bfcd1c33ba62e2515ddc27c944da0 Mon Sep 17 00:00:00 2001 From: wangpggg Date: Wed, 26 Mar 2025 20:11:25 +0800 Subject: [PATCH] modify signed to unsigned Signed-off-by: wangpeng --- frameworks/native/backup_ext/src/untar_file.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/frameworks/native/backup_ext/src/untar_file.cpp b/frameworks/native/backup_ext/src/untar_file.cpp index f78ce3c9d..87d6f9454 100644 --- a/frameworks/native/backup_ext/src/untar_file.cpp +++ b/frameworks/native/backup_ext/src/untar_file.cpp @@ -674,7 +674,7 @@ std::tuple UntarFile::ParsePaxBlock() break; } string pathLen = content.substr(pos, lenEnd - pos); - recLen = std::atoi(pathLen.c_str()); + recLen = static_cast(std::atoi(pathLen.c_str())); allLen = recLen + OTHER_HEADER; if (allLen > BLOCK_SIZE) { isLongName = true; @@ -740,7 +740,7 @@ std::tuple UntarFile::GetLongName(uint32_t recLen, uint32_t al break; } string pathLen = content.substr(pos, lenEnd - pos); - int recLen = std::atoi(pathLen.c_str()); + size_t recLen = static_cast(std::atoi(pathLen.c_str())); string KvPair = content.substr(lenEnd + 1, recLen - (lenEnd - pos + 1)); size_t eqPos = KvPair.find('='); if (eqPos == string::npos) { -- Gitee