Opened 3 years ago

Closed 3 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:
Has a Patch: yes 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 3 years ago.

Download all attachments as: .zip

Change History (5)

comment:1 Changed 3 years ago by mt

Has a Patch: set

comment:2 Changed 3 years ago by korli

LGTM +1

comment:3 Changed 3 years ago by axeld

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 Changed 3 years ago by waddlesplash

Resolution: fixed
Status: newclosed

Applied in hrev50308. Thanks!

Note: See TracTickets for help on using tickets.