-Wshadow and -Wsign-conversion warnings

Submitted by David Evans

Assigned to Nobody

Link to original bugzilla bug (#640)
Version: 3.3 (current stable)

Description

Some warnings about shadowed variables:

TriangularSolverMatrix.h line 136 (shadows 118)
JacobiSVD.h line 395 (shadows 375)
RealQZ.h line 327 (shadows 318)

I also see a lot of warnings for -Wsign-conversion, e.g.

Memory.h line 805 (caused by 0xFFC00000 = unsigned int, not int. Could be fixed by swapping order of & and >>)

PacketMath.h lines 131, 136, 369 (similar issue, looks like the fix would be to explicitly cast)

IO.h line 61 (string [] operator expects size_t). Seems this particular case could be fixed by simplifying the loop:
size_t i = matSuffix.length();
while ((i--)>0 && matSuffix[i]!='\n')
{
rowSpacer += ' ';
}

and so on…

Blocking

#558 (closed)

Edited by Eigen Bugzilla