File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -45,7 +45,10 @@ size_t quoneq_ftp_client::write_file_callback(
4545 std::ofstream* stream
4646) {
4747 size_t total = size * nmemb;
48- stream->write (static_cast <char *>(ptr), total);
48+ stream->write (
49+ static_cast <char *>(ptr),
50+ static_cast <std::streamsize>(total)
51+ );
4952
5053 return total;
5154}
@@ -57,8 +60,12 @@ size_t quoneq_ftp_client::read_file_callback(
5760 if (!stream->good ())
5861 return 0 ;
5962
60- stream->read (static_cast <char *>(ptr), size * nmemb);
61- return stream->gcount ();
63+ stream->read (
64+ static_cast <char *>(ptr),
65+ static_cast <std::streamsize>(size * nmemb)
66+ );
67+
68+ return static_cast <size_t >(stream->gcount ());
6269}
6370
6471std::string quoneq_ftp_client::extract_ftp_path (const std::string &ftp_url) {
Original file line number Diff line number Diff line change @@ -45,7 +45,10 @@ size_t quoneq_http_client::write_file_callback(
4545 std::ofstream* file
4646) {
4747 size_t total_size = size * nmemb;
48- file->write ((char *)contents, total_size);
48+ file->write (
49+ (char *)contents,
50+ static_cast <std::streamsize>(total_size)
51+ );
4952
5053 return total_size;
5154}
You can’t perform that action at this time.
0 commit comments