Tautological-compare warnings in repartition.hh
Can we get rid of the following warnings?
In file included from /home/timok/dune/multidimension/dune-istl/dune/istl/paamg/amg.hh:9:
In file included from /home/timok/dune/multidimension/dune-istl/dune/istl/paamg/transfer.hh:7:
In file included from /home/timok/dune/multidimension/dune-istl/dune/istl/matrixredistribute.hh:5:
/home/timok/dune/multidimension/dune-istl/dune/istl/repartition.hh:809:38: warning: comparison of unsigned expression < 0 is always false [-Wtautological-compare]
if(xadj[vtx]>noEdges||xadj[vtx]<0) {
~~~~~~~~~^~
/home/timok/dune/multidimension/dune-istl/dune/istl/repartition.hh:814:42: warning: comparison of unsigned expression < 0 is always false [-Wtautological-compare]
if(xadj[vtx+1]>noEdges||xadj[vtx+1]<0) {
~~~~~~~~~~~^~
/home/timok/dune/multidimension/dune-istl/dune/istl/repartition.hh:821:21: warning: comparison of unsigned expression < 0 is always false [-Wtautological-compare]
if(adjncy[i]<0||((std::size_t)adjncy[i])>gnoVtx) {
~~~~~~~~~^~
xadj
is of type idxtype*
that points to an unsigned type if parmetis is not present but to a possibly signed type otherwise.
Are the above comparisons necessary? Can the index actually be smaller 0?