Unverified Commit 712c5c67 authored by moto's avatar moto Committed by GitHub
Browse files

Fix compile warnings (#1762)

* Fix comparison between signed and unsigned integer expressions
* Remove unused variable
parent 27e6779c
...@@ -54,7 +54,7 @@ auto apply_effects_fileobj( ...@@ -54,7 +54,7 @@ auto apply_effects_fileobj(
// end up retrieving the static variable defined in `_torchaudio`, which is // end up retrieving the static variable defined in `_torchaudio`, which is
// not correct. // not correct.
const auto bufsiz = get_buffer_size(); const auto bufsiz = get_buffer_size();
const size_t kDefaultCapacityInBytes = 256; const int64_t kDefaultCapacityInBytes = 256;
return (bufsiz > kDefaultCapacityInBytes) ? bufsiz return (bufsiz > kDefaultCapacityInBytes) ? bufsiz
: kDefaultCapacityInBytes; : kDefaultCapacityInBytes;
}(); }();
......
...@@ -43,7 +43,7 @@ auto get_info_fileobj(py::object fileobj, c10::optional<std::string> format) ...@@ -43,7 +43,7 @@ auto get_info_fileobj(py::object fileobj, c10::optional<std::string> format)
// end up retrieving the static variable defined in `_torchaudio`, which is // end up retrieving the static variable defined in `_torchaudio`, which is
// not correct. // not correct.
const auto bufsiz = get_buffer_size(); const auto bufsiz = get_buffer_size();
const size_t kDefaultCapacityInBytes = 4096; const int64_t kDefaultCapacityInBytes = 4096;
return (bufsiz > kDefaultCapacityInBytes) ? bufsiz return (bufsiz > kDefaultCapacityInBytes) ? bufsiz
: kDefaultCapacityInBytes; : kDefaultCapacityInBytes;
}(); }();
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment