diff --git a/frameworks/core/components_ng/pattern/waterflow/water_flow_pattern.cpp b/frameworks/core/components_ng/pattern/waterflow/water_flow_pattern.cpp index 85608c51597..66d9a0784ff 100644 --- a/frameworks/core/components_ng/pattern/waterflow/water_flow_pattern.cpp +++ b/frameworks/core/components_ng/pattern/waterflow/water_flow_pattern.cpp @@ -484,7 +484,7 @@ void WaterFlowPattern::OnSectionChangedNow(int32_t start) CHECK_NULL_VOID(host); int32_t childUpdateIdx = host->GetChildrenUpdated(); if (sections_->IsSpecialUpdateCAPI(childUpdateIdx)) { - start += sections_->GetSectionInfo().size(); + start += static_cast(sections_->GetSectionInfo().size()); } info->InitSegments(sections_->GetSectionInfo(), start); info->margins_.clear(); diff --git a/frameworks/core/image/image_file_cache.cpp b/frameworks/core/image/image_file_cache.cpp index 1c0b08f4923..b1824cb2445 100644 --- a/frameworks/core/image/image_file_cache.cpp +++ b/frameworks/core/image/image_file_cache.cpp @@ -301,7 +301,7 @@ void ImageFileCache::ConvertToAstcAndWriteToFile(const std::string& fileCacheKey removeVector.push_back(filePath); auto infoIter = fileNameToFileInfoPos_[fileCacheKey]; - cacheFileSize_ = cacheFileSize_ + packedSize - infoIter->fileSize; + cacheFileSize_ = cacheFileSize_ + static_cast(packedSize) - infoIter->fileSize; infoIter->fileName = astcFileName; infoIter->fileSize = static_cast(packedSize); }