Opened 8 years ago

Closed 8 years ago

#12744 closed bug (fixed)

[Patch] IMAPConnectionWorker.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

In IMAPConnectionWorker::MessageExpungeReceived(), gcc6 warns '-Werror=nonnull-compare'. Since IMAPConnectionWorker class has 'fLocker', it seems to be better to use 'fLocker'with BAutolock.

/home/haiku/haiku/haiku/src/add-ons/mail_daemon/inbound_protocols/imap/IMAPConnectionWorker.cpp: In member function 'virtual void IMAPConnectionWorker::MessageExpungeReceived(uint32)':
/home/haiku/haiku/haiku/src/add-ons/mail_daemon/inbound_protocols/imap/IMAPConnectionWorker.cpp:702:21: error: nonnull argument 'this' compared to NULL [-Werror=nonnull-compare]
  BLocker locker(this);
                     ^
cc1plus: all warnings being treated as errors

Attachments (1)

0003-IMAPConnectionWorker.cpp-fix-gcc6-build.patch (953 bytes ) - added by mt 8 years ago.

Download all attachments as: .zip

Change History (5)

comment:1 by mt, 8 years ago

patch: 01

comment:2 by korli, 8 years ago

LGTM +1

comment:3 by axeld, 8 years ago

Ouch using BLocker here is indeed a braindead typo. I guess we should make the copy constructor private in BLocker to prevent that kind of stupidity.

comment:4 by waddlesplash, 8 years ago

Resolution: fixed
Status: newclosed

Applied in hrev50308. Thanks!

Note: See TracTickets for help on using tickets.