[haiku-bugs] [Haiku] #12748: [Patch] Angle.cpp: fix gcc6 build

  • From: "mt" <trac@xxxxxxxxxxxx>
  • Date: Thu, 05 May 2016 11:08:16 -0000

#12748: [Patch] Angle.cpp: fix gcc6 build
--------------------------------+------------------------------
 Reporter:  mt                  |        Owner:  axeld
     Type:  bug                 |       Status:  new
 Priority:  normal              |    Milestone:  Unscheduled
Component:  Servers/app_server  |      Version:  R1/Development
 Keywords:                      |   Blocked By:
 Blocking:                      |  Has a Patch:  0
 Platform:  All                 |
--------------------------------+------------------------------
 Gcc6 warns '-Werror=misleading-indentation', so I reindent source code.

 {{{
 C++ /home/haiku/haiku/haiku/generated-
 gcc6/objects/haiku/x86/release/servers/app/Angle.o
 /home/haiku/haiku/haiku/src/servers/app/Angle.cpp: In member function
 'Angle Angle::Constrain180()':
 /home/haiku/haiku/haiku/src/servers/app/Angle.cpp:228:5: error: this 'if'
 clause does not guard... [-Werror=misleading-indentation]
      if (value < 0)
      ^~
 /home/haiku/haiku/haiku/src/servers/app/Angle.cpp:230:2: note: ...this
 statement, but the latter is misleadingly indented as if it is guarded by
 the 'if'
   return Angle(value);
   ^~~~~~
 /home/haiku/haiku/haiku/src/servers/app/Angle.cpp: In member function
 'Angle Angle::Constrain90()':
 /home/haiku/haiku/haiku/src/servers/app/Angle.cpp:245:5: error: this 'if'
 clause does not guard... [-Werror=misleading-indentation]
      if (value < 0)
      ^~
 /home/haiku/haiku/haiku/src/servers/app/Angle.cpp:247:2: note: ...this
 statement, but the latter is misleadingly indented as if it is guarded by
 the 'if'
   return Angle(value);
   ^~~~~~
 cc1plus: all warnings being treated as errors
 }}}

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

Other related posts: