[haiku-bugs] [Haiku] #12745: [Patch] SMTP.cpp: fix gcc6 build

  • From: "mt" <trac@xxxxxxxxxxxx>
  • Date: Tue, 03 May 2016 11:14:58 -0000

#12745: [Patch] SMTP.cpp: fix gcc6 build
---------------------------+------------------------------
 Reporter:  mt             |        Owner:  czeidler
     Type:  bug            |       Status:  new
 Priority:  normal         |    Milestone:  Unscheduled
Component:  Kits/Mail Kit  |      Version:  R1/Development
 Keywords:                 |   Blocked By:
 Blocking:                 |  Has a Patch:  0
 Platform:  All            |
---------------------------+------------------------------
 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
 }}}

--
Ticket URL: <https://dev.haiku-os.org/ticket/12745>
Haiku <https://dev.haiku-os.org>
Haiku - the operating system.

Other related posts: