Ticket #12745: 0004-SMTP.cpp-fix-gcc6-build.patch

File 0004-SMTP.cpp-fix-gcc6-build.patch, 2.1 KB (added by mt, 8 years ago)
  • src/add-ons/mail_daemon/outbound_protocols/smtp/SMTP.cpp

    From 09a5f5b4db488c63c2c93c14e58d1d56c69015b0 Mon Sep 17 00:00:00 2001
    From: Murai Takashi <tmurai01@gmail.com>
    Date: Tue, 3 May 2016 19:44:03 +0900
    Subject: [PATCH 4/4] SMTP.cpp: fix gcc6 build
    
    * Add curly braces to fix '-Werror=misleading-indentation' warnings.
    ---
     src/add-ons/mail_daemon/outbound_protocols/smtp/SMTP.cpp | 12 +++++++++---
     1 file changed, 9 insertions(+), 3 deletions(-)
    
    diff --git a/src/add-ons/mail_daemon/outbound_protocols/smtp/SMTP.cpp b/src/add-ons/mail_daemon/outbound_protocols/smtp/SMTP.cpp
    index 59e2c5a..d46d9ae 100644
    a b SMTPProtocol::Send(const char* to, const char* from, BPositionIO *message)  
    908908            if (amountUnread <= 0) { // No more data, all we have is in the buffer.
    909909                if (bufferLen > 0) {
    910910                            #ifdef USE_SSL
    911                                     if (use_ssl)
     911                                    if (use_ssl) {
    912912                                            SSL_write(ssl,data,bufferLen);
    913                                     else
     913                                    } else {
    914914                            #endif
    915915                    send (fSocket,data, bufferLen,0);
     916                            #ifdef USE_SSL
     917                                    }
     918                            #endif
    916919                    ReportProgress (bufferLen,0);
    917920                    if (bufferLen >= 2)
    918921                        messageEndedWithCRLF = (data[bufferLen-2] == '\r' &&
    SMTPProtocol::Send(const char* to, const char* from, BPositionIO *message)  
    928931                            if (use_ssl) {
    929932                                    if (SSL_write(ssl,data,bufferLen - 3) < 0)
    930933                                        break;
    931                             } else
     934                            } else {
    932935                        #endif
    933936                if (send (fSocket,data, bufferLen - 3,0) < 0)
    934937                    break; // Stop when an error happens.
     938                        #ifdef USE_SSL
     939                            }
     940                        #endif
    935941                ReportProgress (bufferLen - 3,0);
    936942                memmove (data, data + bufferLen - 3, 3);
    937943                bufferLen = 3;