On Fri, Aug 13, 2010 at 2:50 AM, Axel Dörfler <axeld@xxxxxxxxxxxxxxxx> wrote: > anevilyak@xxxxxxxxx wrote: >> - if (!fPrivateData || index < 0 || index > Length()) >> + if (!fPrivateData || index < 0 || index >= Length()) > > Out of curiosity: how can that one fix a build error? It was triggering a warning in the IMAP client, which was marked -Werror: AppendToContainerCopyFilesScript haiku.image-copy-files-dummy-system/add-ons/locale/catalogs C++ /boot/home/develop/haiku/haiku/generated.x86gcc4/objects/haiku/x86/release/add-ons/mail_daemon/inbound_protocols/imap/ssl/imap_client.o cc1plus: warnings being treated as errors /boot/home/develop/haiku/haiku/headers/os/support/String.h: In member function 'virtual status_t IMAP4Client::CreateMailbox(const char*)': /boot/home/develop/haiku/haiku/headers/os/support/String.h:424: error: assuming signed overflow does not occur when assuming that (X - c) > X is always false /boot/home/develop/haiku/haiku/headers/os/support/String.h: In member function 'void IMAP4Client::InitializeMailboxes()': /boot/home/develop/haiku/haiku/headers/os/support/String.h:424: error: assuming signed overflow does not occur when assuming that (X - c) > X is always false Oddly enough that one only appeared when building on Haiku itself with gcc 4.3.3 though. The check was definitely incorrect in any case since the valid range for ByteAt() is 0 -> Length() - 1 while the check would've allowed Length() as well. Regards, Rene