# HG changeset patch # User Jaroslav Hajek # Date 1234943625 -3600 # Node ID ee3446ca6157d2b0eb78927b7225da9e6a49e1f6 # Parent 9662dfb266523ae2d5554bd7ac357e74834a07e5 avoid warning in oct-inttypes.cc diff --git a/liboctave/ChangeLog b/liboctave/ChangeLog --- a/liboctave/ChangeLog +++ b/liboctave/ChangeLog @@ -1,3 +1,8 @@ +2009-02-18 Jaroslav Hajek + + * oct-inttypes.cc (pow (const octave_int&, const octave_int&)): + Use octave_int comparisons to avoid warning for unsigned types. + 2009-02-17 Jaroslav Hajek * Array.cc (Array::resize (const dim_vector&)): Remove dead branch. diff --git a/liboctave/oct-inttypes.cc b/liboctave/oct-inttypes.cc --- a/liboctave/oct-inttypes.cc +++ b/liboctave/oct-inttypes.cc @@ -538,7 +538,7 @@ // the is_signed check is inserted twice to avoid compiler warnings else if (std::numeric_limits::is_signed && b < zero) { - if (std::numeric_limits::is_signed && a.value () == -1) + if (a == octave_int (-1)) retval = (b.value () % 2) ? a : one; else retval = zero;