bug-apl
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Bug-apl] Warnings when compiling with -Wall


From: Elias Mårtenson
Subject: [Bug-apl] Warnings when compiling with -Wall
Date: Wed, 9 Apr 2014 21:56:26 +0800

There are plenty of warnings when compiling with the -Wall flag. One example is the following error (it's included from my code, but the error is in UCS_string.hh):

c++ -Wall -fPIC -g -I/home/elias/src/apl/src   -c -o ResultValue.o ResultValue.cc
In file included from /home/elias/src/apl/src/Error.hh:27:0,
                 from /home/elias/src/apl/src/Token.hh:29,
                 from /home/elias/src/apl/src/Parser.hh:24,
                 from /home/elias/src/apl/src/Cell.hh:26,
                 from ResultValue.hh:24,
                 from ResultValue.cc:21:
/home/elias/src/apl/src/UCS_string.hh: In member function ‘bool UCS_string::all_zeroes()’:
/home/elias/src/apl/src/UCS_string.hh:140:37: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
       { for (size_t s = 0; s < size(); ++s)
                                     ^

I want to fix these, but in many cases the solution is not entirely clear. In the above case, for example, you could either do a static_cast<size_t>(size()), or one could change the return value of the size() function to size_t.

There are plenty of others. Would you like me to send patches for the obvious ones?

Regards,
Elias

reply via email to

[Prev in Thread] Current Thread [Next in Thread]