- marked as trivial
warning
Issue #34
resolved
/home/detlef/oakfoam-hg/oakfoam/src/engine/DecisionTree.cc:1788:51: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
Comments (6)
-
repo owner -
reporter No warning at 1791, even if I change 1788 from unsigned int i to signed int i. I use gcc 4.7.2 (debian testing)
-
reporter no other warnings at all, sorry I did not mention that
-
repo owner Can you please try replace line 1788 with
for (unsigned int i=1; i<(unsigned int)(1<<colslist.size()); i++)
and see if that removes the warning for you?
-
reporter for (unsigned int i=1; i<((unsigned int)1<<colslist.size()); i++)
removed it, what I think might be the cleaner way. Now the unsigned int 1 is shifted?!
-
repo owner - changed status to resolved
Resolved with commit a6bddf4
- Log in to comment
Do you get a similar warning on other lines? It should at least get triggered by line 1791 as well. I'm using gcc 4.6.3 and I don't get that warning.
The warning should affect functionality at all, but it should be resolved for obvious reasons.