diff --git a/winsup/cygwin/fhandler/dsp.cc b/winsup/cygwin/fhandler/dsp.cc index d930328ce..dbe27905a 100644 --- a/winsup/cygwin/fhandler/dsp.cc +++ b/winsup/cygwin/fhandler/dsp.cc @@ -1188,7 +1188,9 @@ fhandler_dev_dsp::_read (void *ptr, size_t& len) return; } - audio_in_->read ((char *)ptr, (int&)len); + int res = len; + audio_in_->read ((char *)ptr, res); + len = (size_t)res; } void