Skip to content

Commit 712c5c6

Browse files
authored
Fix compile warnings (#1762)
* Fix comparison between signed and unsigned integer expressions * Remove unused variable
1 parent 27e6779 commit 712c5c6

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

torchaudio/csrc/pybind/sox/effects.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ auto apply_effects_fileobj(
5454
// end up retrieving the static variable defined in `_torchaudio`, which is
5555
// not correct.
5656
const auto bufsiz = get_buffer_size();
57-
const size_t kDefaultCapacityInBytes = 256;
57+
const int64_t kDefaultCapacityInBytes = 256;
5858
return (bufsiz > kDefaultCapacityInBytes) ? bufsiz
5959
: kDefaultCapacityInBytes;
6060
}();

torchaudio/csrc/pybind/sox/io.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ auto get_info_fileobj(py::object fileobj, c10::optional<std::string> format)
4343
// end up retrieving the static variable defined in `_torchaudio`, which is
4444
// not correct.
4545
const auto bufsiz = get_buffer_size();
46-
const size_t kDefaultCapacityInBytes = 4096;
46+
const int64_t kDefaultCapacityInBytes = 4096;
4747
return (bufsiz > kDefaultCapacityInBytes) ? bufsiz
4848
: kDefaultCapacityInBytes;
4949
}();

0 commit comments

Comments
 (0)