On 2010-08-08 at 16:47:49 [+0200], Andreas Färber <andreas.faerber@xxxxxx> wrote: > Back from a vacation, I'm trying to update Haiku from r37391 to HEAD > (r37973), natively. > > It fails as follows: > > C++ /Source/haiku/generated-gcc4/objects/haiku/x86/release/add-ons/ > mail_daemon/inbound_protocols/imap/ssl/imap_client.o > cc1plus: warnings being treated as errors > /Source/haiku/headers/os/support/String.h: In member function 'virtual > status_t IMAP4Client::CreateMailbox(const char*)': > /Source/haiku/headers/os/support/String.h:424: error: assuming signed > overflow does not occur when assuming that (X - c) > X is always false > /Source/haiku/headers/os/support/String.h: In member function 'void > IMAP4Client::InitializeMailboxes()': > /Source/haiku/headers/os/support/String.h:424: error: assuming signed > overflow does not occur when assuming that (X - c) > X is always false > > http://dev.haiku-os.org/browser/haiku/trunk/headers/os/support/String.h?rev=37973#L424 > > Anyone any clue how to fix? Neither this line nor Length() does any > funky comparison, and both are of int32 type. BString is not to blame. IIRC when GCC inlined functions it used to throw useless warnings of this kind. It used additional information available at the point of inlining and could consider inlined checks to be superfluous, which could lead to this kind of warning. Perhaps this problem is still with us with our current gcc. That being said, IMAP4Client::CreateMailbox() does look weird: if ((mb_root.ByteAt(mb_root.Length() - 1) != hierarchy_delimiter.ByteAt(0)) && (mb_root.Length() > 0)) CU, Ingo