Opened 9 years ago
Closed 9 years ago
#12745 closed bug (fixed)
[Patch] SMTP.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=misleading-indentation', so add curly braces to fix it.
/home/haiku/haiku/haiku/src/add-ons/mail_daemon/outbound_protocols/smtp/SMTP.cpp: In member function 'status_t SMTPProtocol::Send(const char*, const char*, BPositionIO*)': /home/haiku/haiku/haiku/src/add-ons/mail_daemon/outbound_protocols/smtp/SMTP.cpp:913:37: error: this 'else' clause does not guard... [-Werror=misleading-indentation] else ^~~~ /home/haiku/haiku/haiku/src/add-ons/mail_daemon/outbound_protocols/smtp/SMTP.cpp:916:6: note: ...this statement, but the latter is misleadingly indented as if it is guarded by the 'else' ReportProgress (bufferLen,0); ^~~~~~~~~~~~~~ /home/haiku/haiku/haiku/src/add-ons/mail_daemon/outbound_protocols/smtp/SMTP.cpp:931:31: error: this 'else' clause does not guard... [-Werror=misleading-indentation] } else ^~~~ /home/haiku/haiku/haiku/src/add-ons/mail_daemon/outbound_protocols/smtp/SMTP.cpp:935:5: note: ...this statement, but the latter is misleadingly indented as if it is guarded by the 'else' ReportProgress (bufferLen - 3,0); ^~~~~~~~~~~~~~ cc1plus: all warnings being treated as errors
Attachments (2)
Change History (7)
by , 9 years ago
Attachment: | 0004-SMTP.cpp-fix-gcc6-build.patch added |
---|
comment:1 by , 9 years ago
patch: | 0 → 1 |
---|
comment:2 by , 9 years ago
follow-up: 4 comment:3 by , 9 years ago
I think I'd prefer to move the send() call into either a local macro, or an extra method, like this:
ssize_t SMTPProtocol::_SendData(const void* data, size_t length) { #ifdef USE_SSL if (use_ssl) return SSL_write(ssl, data, length); #endif return send(fSocket, data, length); }
comment:4 by , 9 years ago
Replying to axeld:
I think I'd prefer to move the send() call into either a local macro, or an extra method, like this:
Hi axeld, I update patch.
by , 9 years ago
Attachment: | 0003-SMTP.cpp-fix-gcc6-build.patch added |
---|
Note:
See TracTickets
for help on using tickets.
LGTM, but maybe needs another +1.