diff options
3 files changed, 7 insertions, 4 deletions
diff --git a/ppapi/native_client/src/trusted/plugin/file_downloader.cc b/ppapi/native_client/src/trusted/plugin/file_downloader.cc index 836077c..fd9d38f5 100644 --- a/ppapi/native_client/src/trusted/plugin/file_downloader.cc +++ b/ppapi/native_client/src/trusted/plugin/file_downloader.cc @@ -301,8 +301,10 @@ void FileDownloader::URLBufferStartNotify(int32_t pp_error) { // Finish streaming the body asynchronously providing a callback. pp::CompletionCallback onread_callback = callback_factory_.NewOptionalCallback(&FileDownloader::URLReadBodyNotify); + + int32_t temp_size = static_cast<int32_t>(temp_buffer_.size()); pp_error = url_loader_.ReadResponseBody(&temp_buffer_[0], - temp_buffer_.size(), + temp_size, onread_callback); bool async_notify_ok = (pp_error == PP_OK_COMPLETIONPENDING); PLUGIN_PRINTF(("FileDownloader::URLBufferStartNotify (async_notify_ok=%d)\n", @@ -335,8 +337,9 @@ void FileDownloader::URLReadBodyNotify(int32_t pp_error) { pp::CompletionCallback onread_callback = callback_factory_.NewOptionalCallback( &FileDownloader::URLReadBodyNotify); + int32_t temp_size = static_cast<int32_t>(temp_buffer_.size()); pp_error = url_loader_.ReadResponseBody(&temp_buffer_[0], - temp_buffer_.size(), + temp_size, onread_callback); bool async_notify_ok = (pp_error == PP_OK_COMPLETIONPENDING); if (!async_notify_ok) { diff --git a/ppapi/native_client/src/trusted/plugin/nacl_subprocess.cc b/ppapi/native_client/src/trusted/plugin/nacl_subprocess.cc index c492df9..8f769f8 100644 --- a/ppapi/native_client/src/trusted/plugin/nacl_subprocess.cc +++ b/ppapi/native_client/src/trusted/plugin/nacl_subprocess.cc @@ -103,7 +103,7 @@ bool NaClSubprocess::VInvokeSrpcMethod(const nacl::string& method_name, } memcpy(input, orig_arr, len); params->ins()[i]->arrays.carr = input; - params->ins()[i]->u.count = len; + params->ins()[i]->u.count = static_cast<nacl_abi_size_t>(len); break; } case NACL_SRPC_ARG_TYPE_HANDLE: { diff --git a/ppapi/native_client/src/trusted/plugin/pnacl_streaming_translate_thread.cc b/ppapi/native_client/src/trusted/plugin/pnacl_streaming_translate_thread.cc index 58aeecd..61924fc 100644 --- a/ppapi/native_client/src/trusted/plugin/pnacl_streaming_translate_thread.cc +++ b/ppapi/native_client/src/trusted/plugin/pnacl_streaming_translate_thread.cc @@ -62,7 +62,7 @@ void PnaclStreamingTranslateThread::PutBytes(std::vector<char>* bytes, int count) { PLUGIN_PRINTF(("PutBytes, this %p bytes %p, size %d, count %d\n", this, bytes, bytes ? bytes->size(): 0, count)); - int buffer_size = 0; + size_t buffer_size = 0; // Ensure that the buffer we send to the translation thread is the right size // (count can be < the buffer size). This can be done without the lock. if (bytes != NULL && count >= 0) { |