Fix -Wshorten-64-to-32 warnings

This commit is contained in:
Andrew Gaul 2023-07-26 11:23:49 +09:00
parent 6344d74ae3
commit 0ece204393
4 changed files with 5 additions and 5 deletions

View File

@ -2349,7 +2349,7 @@ ssize_t FdEntity::WriteStreamUpload(PseudoFdInfo* pseudo_obj, const char* bytes,
// //
headers_t tmporgmeta = orgmeta; headers_t tmporgmeta = orgmeta;
bool isuploading = pseudo_obj->IsUploading(); bool isuploading = pseudo_obj->IsUploading();
int result; ssize_t result;
if(0 != (result = pseudo_obj->UploadBoundaryLastUntreatedArea(path.c_str(), tmporgmeta, this))){ if(0 != (result = pseudo_obj->UploadBoundaryLastUntreatedArea(path.c_str(), tmporgmeta, this))){
S3FS_PRN_ERR("Failed to upload the last untreated parts(area) : result=%d", result); S3FS_PRN_ERR("Failed to upload the last untreated parts(area) : result=%d", result);
return result; return result;

View File

@ -740,7 +740,7 @@ bool PseudoFdInfo::ExtractUploadPartsFromUntreatedArea(off_t& untreated_start, o
// Add upload area to the list // Add upload area to the list
// //
while(max_mp_size <= aligned_size){ while(max_mp_size <= aligned_size){
int part_num = (aligned_start / max_mp_size) + 1; int part_num = static_cast<int>((aligned_start / max_mp_size) + 1);
to_upload_list.push_back(mp_part(aligned_start, max_mp_size, part_num)); to_upload_list.push_back(mp_part(aligned_start, max_mp_size, part_num));
aligned_start += max_mp_size; aligned_start += max_mp_size;
@ -888,7 +888,7 @@ bool PseudoFdInfo::ExtractUploadPartsFromAllArea(UntreatedParts& untreated_list,
// //
// Create upload/download/cancel/copy list for this current area // Create upload/download/cancel/copy list for this current area
// //
int part_num = (cur_start / max_mp_size) + 1; int part_num = static_cast<int>((cur_start / max_mp_size) + 1);
if(cur_untreated_list.empty()){ if(cur_untreated_list.empty()){
// //
// No untreated area was detected in this current area // No untreated area was detected in this current area

View File

@ -265,7 +265,7 @@ unsigned char* s3fs_md5_fd(int fd, off_t start, off_t size)
{ {
EVP_MD_CTX* mdctx; EVP_MD_CTX* mdctx;
unsigned char* md5_digest; unsigned char* md5_digest;
unsigned int md5_digest_len = get_md5_digest_length(); unsigned int md5_digest_len = static_cast<unsigned int>(get_md5_digest_length());
off_t bytes; off_t bytes;
if(-1 == size){ if(-1 == size){

View File

@ -198,7 +198,7 @@ bool ThreadPoolMan::StopThreads()
// all threads to exit // all threads to exit
SetExitFlag(true); SetExitFlag(true);
for(uint waitcnt = thread_list.size(); 0 < waitcnt; --waitcnt){ for(size_t waitcnt = thread_list.size(); 0 < waitcnt; --waitcnt){
thpoolman_sem.post(); thpoolman_sem.post();
} }