Mercurial > octave
changeset 27863:546346314210
Avoid warning from gcc 9 about comparison of expressions of different signedness
* oct-sort.cc (roundupsize): Cast to size_t for comparision.
author | Markus Mützel <markus.muetzel@gmx.de> |
---|---|
date | Sun, 22 Dec 2019 18:35:51 +0100 |
parents | 813f76932ab6 |
children | da3c6aef85fe |
files | liboctave/util/oct-sort.cc |
diffstat | 1 files changed, 3 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/liboctave/util/oct-sort.cc Sun Dec 22 17:06:19 2019 +0100 +++ b/liboctave/util/oct-sort.cc Sun Dec 22 18:35:51 2019 +0100 @@ -529,7 +529,9 @@ size_t new_size = ((n >> nbits) + 1) << nbits; - if (new_size == 0 || new_size > std::numeric_limits<octave_idx_type>::max ()) + if (new_size == 0 + || new_size + > static_cast<size_t> (std::numeric_limits<octave_idx_type>::max ())) (*current_liboctave_error_handler) ("unable to allocate sufficient memory for sort");