diff --git a/services/remote_file_share/src/remote_file_share.cpp b/services/remote_file_share/src/remote_file_share.cpp index 2e8eb47ca8e2fb13667e008a0fd991cb0c594aaa..2fb470530882a0fcd9e0d919251d28ee145270ce 100644 --- a/services/remote_file_share/src/remote_file_share.cpp +++ b/services/remote_file_share/src/remote_file_share.cpp @@ -77,7 +77,7 @@ static std::string GetFileName(const int &fd) } std::string fileName = filePath; - int firstSlash = fileName.rfind("/"); + std::size_t firstSlash = fileName.rfind("/"); if (firstSlash == fileName.npos) { LOGE("RemoteFileShare::GetFileName, get error path with %{public}s", fileName.c_str()); return "";