|
|
Home » U++ Library support » U++ Library : Other (not classified elsewhere) » Compiling U++ Core with -Wall (GCC 4.1.2 Kubuntu 6.10)
Compiling U++ Core with -Wall (GCC 4.1.2 Kubuntu 6.10) [message #12213] |
Thu, 18 October 2007 21:53 |
mr_ped
Messages: 825 Registered: November 2005 Location: Czech Republic - Praha
|
Experienced Contributor |
|
|
There's lot of warnings making the output of compilation too much cluttered, thus hard to spot warnings in my own code.
I think lot of them can be easily removed without risk of breaking current Core functionality.
But I'm not going to fix them, there's no point without serious version controlling system where I can commit changes directly.
/home/ped/upp/uppsrc/Core/Path.h:202: warning: ‘class Upp::FileSystemInfo’ has virtual functions but non-virtual destructor
/home/ped/upp/uppsrc/Core/Value.h: In member function ‘bool Upp::Value::IsError() const’:
/home/ped/upp/uppsrc/Core/Value.h:132: warning: comparison between signed and unsigned integer expressions
/home/ped/upp/uppsrc/Core/Value.h: In member function ‘bool Upp::Value::IsVoid() const’:
/home/ped/upp/uppsrc/Core/Value.h:133: warning: comparison between signed and unsigned integer expressions
/home/ped/upp/uppsrc/Core/Value.h: In function ‘bool Upp::IsVoid(const Upp::Value&)’:
/home/ped/upp/uppsrc/Core/Value.h:203: warning: comparison between signed and unsigned integer expressions
/home/ped/upp/uppsrc/Core/Value.h: In function ‘bool Upp::IsError(const Upp::Value&)’:
/home/ped/upp/uppsrc/Core/Value.h:204: warning: comparison between signed and unsigned integer expressions
/home/ped/upp/uppsrc/Core/Value.h: In function ‘bool Upp::IsString(const Upp::Value&)’:
/home/ped/upp/uppsrc/Core/Value.h:205: warning: comparison between signed and unsigned integer expressions
/home/ped/upp/uppsrc/Core/Value.h:205: warning: comparison between signed and unsigned integer expressions
/home/ped/upp/uppsrc/Core/Value.h: In function ‘bool Upp::IsNumber(const Upp::Value&)’:
/home/ped/upp/uppsrc/Core/Value.h:206: warning: comparison between signed and unsigned integer expressions
/home/ped/upp/uppsrc/Core/Value.h:206: warning: comparison between signed and unsigned integer expressions
/home/ped/upp/uppsrc/Core/Value.h:207: warning: comparison between signed and unsigned integer expressions
/home/ped/upp/uppsrc/Core/Value.h:207: warning: comparison between signed and unsigned integer expressions
/home/ped/upp/uppsrc/Core/Value.h: In function ‘bool Upp::IsDateTime(const Upp::Value&)’:
/home/ped/upp/uppsrc/Core/Value.h:208: warning: comparison between signed and unsigned integer expressions
/home/ped/upp/uppsrc/Core/Value.h:208: warning: comparison between signed and unsigned integer expressions
/home/ped/upp/uppsrc/Core/Value.h: At global scope:
/home/ped/upp/uppsrc/Core/Value.h:216: warning: ‘struct Upp::ValueOrder’ has virtual functions but non-virtual destructor
/home/ped/upp/uppsrc/Core/Value.h: In function ‘bool Upp::IsPolyEqual(const bool&, const Upp::Value&)’:
/home/ped/upp/uppsrc/Core/Value.h:374: warning: comparison between signed and unsigned integer expressions
/home/ped/upp/uppsrc/Core/Value.h:375: warning: comparison between signed and unsigned integer expressions
/home/ped/upp/uppsrc/Core/Value.h:376: warning: comparison between signed and unsigned integer expressions
/home/ped/upp/uppsrc/Core/Value.h: In function ‘bool Upp::IsPolyEqual(const int&, const Upp::Value&)’:
/home/ped/upp/uppsrc/Core/Value.h:380: warning: comparison between signed and unsigned integer expressions
/home/ped/upp/uppsrc/Core/Value.h:381: warning: comparison between signed and unsigned integer expressions
/home/ped/upp/uppsrc/Core/Value.h: In function ‘bool Upp::IsPolyEqual(const Upp::int64&, const Upp::Value&)’:
/home/ped/upp/uppsrc/Core/Value.h:385: warning: comparison between signed and unsigned integer expressions
/home/ped/upp/uppsrc/Core/Value.h: In function ‘bool Upp::IsPolyEqual(const Upp::Date&, const Upp::Value&)’:
/home/ped/upp/uppsrc/Core/Value.h:389: warning: comparison between signed and unsigned integer expressions
/home/ped/upp/uppsrc/Core/Value.h: In function ‘bool Upp::IsPolyEqual(const Upp::WString&, const Upp::Value&)’:
/home/ped/upp/uppsrc/Core/Value.h:393: warning: comparison between signed and unsigned integer expressions
/home/ped/upp/uppsrc/Core/Value.h: At global scope:
/home/ped/upp/uppsrc/Core/Value.h:487: warning: ‘struct Upp::RefManager’ has virtual functions but non-virtual destructor
/home/ped/upp/uppsrc/Core/Value.h: In function ‘Upp::Value& Upp::RefValue(Upp::Ref)’:
/home/ped/upp/uppsrc/Core/Value.h:554: warning: comparison between signed and unsigned integer expressions
/home/ped/upp/uppsrc/Core/Value.h: At global scope:
/home/ped/upp/uppsrc/Core/Value.h:637: warning: ‘class Upp::ValueGen’ has virtual functions but non-virtual destructor
/home/ped/upp/uppsrc/Core/Util.h:276: warning: ‘struct Upp::TextTest’ has virtual functions but non-virtual destructor
/home/ped/upp/uppsrc/Core/Util.h:280: warning: ‘class Upp::CharFilterTextTest’ has virtual functions but non-virtual destructor
/home/ped/upp/uppsrc/Core/String.hpp: In member function ‘void Upp::AStringBuffer<T, St>::Expand() [with T = char, S = Upp::Stri
ng]’:
/home/ped/upp/uppsrc/Core/String.h:193: instantiated from ‘void Upp::AStringBuffer<T, St>::Cat(int) [with T = char, S = Upp::S
tring]’
/home/ped/upp/uppsrc/Core/String.h:321: instantiated from here
/home/ped/upp/uppsrc/Core/String.hpp:442: warning: unused variable ‘d’
/home/ped/upp/uppsrc/Core/String.hpp: In member function ‘void Upp::AStringBuffer<T, St>::Expand(int) [with T = char, S = Upp::S
tring]’:
/home/ped/upp/uppsrc/Core/String.h:194: instantiated from ‘void Upp::AStringBuffer<T, St>::Cat(int, int) [with T = char, S = U
pp::String]’
/home/ped/upp/uppsrc/Core/String.h:322: instantiated from here
/home/ped/upp/uppsrc/Core/String.hpp:449: warning: unused variable ‘d’
/home/ped/upp/uppsrc/Core/String.hpp: In member function ‘void Upp::AStringBuffer<T, St>::Expand() [with T = short unsigned int,
S = Upp::WString]’:
/home/ped/upp/uppsrc/Core/String.h:193: instantiated from ‘void Upp::AStringBuffer<T, St>::Cat(int) [with T = short unsigned i
nt, S = Upp::WString]’
/home/ped/upp/uppsrc/Core/String.h:618: instantiated from here
/home/ped/upp/uppsrc/Core/String.hpp:442: warning: unused variable ‘d’
/home/ped/upp/uppsrc/Core/String.hpp: In member function ‘void Upp::AStringBuffer<T, St>::Expand(int) [with T = short unsigned i
nt, S = Upp::WString]’:
/home/ped/upp/uppsrc/Core/String.h:194: instantiated from ‘void Upp::AStringBuffer<T, St>::Cat(int, int) [with T = short unsig
ned int, S = Upp::WString]’
/home/ped/upp/uppsrc/Core/String.h:619: instantiated from here
/home/ped/upp/uppsrc/Core/String.hpp:449: warning: unused variable ‘d’
EDIT:
(that's just includes, compiling the Core package itself will yield even more of them)
I tried to fix some of them, except missing virtual destructors I have got everything fixed, and I think it will work as supposed.
Yet the things like
template <class T, class S>
void AStringBuffer<T, S>::Expand(int len)
{
/*typename S::Data *d = */S::GetData(begin);
Realloc(max(8, max((int)(intptr_t)(alloc - begin + len), 2 * (int)(intptr_t)(alloc - begin))));
}
do make me a bit uncomfortable. I don't understand what "typename S::Data *d" really means and if commenting it out is ok.
[Updated on: Thu, 18 October 2007 22:07] Report message to a moderator
|
|
|
|
|
|
Goto Forum:
Current Time: Thu Apr 25 00:59:32 CEST 2024
Total time taken to generate the page: 0.03342 seconds
|
|
|