Opened 9 years ago
Closed 9 years ago
#12743 closed bug (fixed)
[Patch] MailProtocol.cpp: fix gcc6 build
Reported by: | mt | Owned by: | czeidler |
---|---|---|---|
Priority: | normal | Milestone: | Unscheduled |
Component: | Kits/Mail Kit | Version: | R1/Development |
Keywords: | Cc: | ||
Blocked By: | Blocking: | ||
Platform: | All |
Description
Gcc6 warns '-Werror=nonnull-compare' in some functions. It seems it is better to use BAutolock(this) than Blocker(this).
C++ /home/haiku/haiku/haiku/generated-gcc6/objects/haiku/x86/release/kits/mail/ssl/MailProtocol.o /home/haiku/haiku/haiku/src/kits/mail/MailProtocol.cpp: In member function 'bool BMailProtocol::AddFilter(BMailFilter*)': /home/haiku/haiku/haiku/src/kits/mail/MailProtocol.cpp:91:21: error: nonnull argument 'this' compared to NULL [-Werror=nonnull-compare] BLocker locker(this); ^ /home/haiku/haiku/haiku/src/kits/mail/MailProtocol.cpp: In member function 'int32 BMailProtocol::CountFilter() const': /home/haiku/haiku/haiku/src/kits/mail/MailProtocol.cpp:99:21: error: nonnull argument 'this' compared to NULL [-Werror=nonnull-compare] BLocker locker(this); ^ /home/haiku/haiku/haiku/src/kits/mail/MailProtocol.cpp: In member function 'BMailFilter* BMailProtocol::FilterAt(int32) const': /home/haiku/haiku/haiku/src/kits/mail/MailProtocol.cpp:107:21: error: nonnull argument 'this' compared to NULL [-Werror=nonnull-compare] BLocker locker(this); ^ /home/haiku/haiku/haiku/src/kits/mail/MailProtocol.cpp: In member function 'BMailFilter* BMailProtocol::RemoveFilter(int32)': /home/haiku/haiku/haiku/src/kits/mail/MailProtocol.cpp:115:21: error: nonnull argument 'this' compared to NULL [-Werror=nonnull-compare] BLocker locker(this); ^ /home/haiku/haiku/haiku/src/kits/mail/MailProtocol.cpp: In member function 'bool BMailProtocol::RemoveFilter(BMailFilter*)': /home/haiku/haiku/haiku/src/kits/mail/MailProtocol.cpp:123:21: error: nonnull argument 'this' compared to NULL [-Werror=nonnull-compare] BLocker locker(this); ^ cc1plus: all warnings being treated as errors
Attachments (2)
Change History (6)
by , 9 years ago
Attachment: | 0004-MailProtocol.cpp-fix-gcc6-build.patch added |
---|
comment:1 by , 9 years ago
patch: | 0 → 1 |
---|
follow-up: 3 comment:2 by , 9 years ago
comment:3 by , 9 years ago
Replying to korli:
Includes order should be alphabetical.
Hi korli, I sorted headers and add name to BAutolocks.
by , 9 years ago
Attachment: | 0002-MailProtocol.cpp-fix-gcc6-build.patch added |
---|
Note:
See TracTickets
for help on using tickets.
Includes order should be alphabetical.