[haiku-bugs] [Haiku] #12756: [Patch] kits/print/PicturePrinter.cpp: fix gcc6 build

  • From: "mt" <trac@xxxxxxxxxxxx>
  • Date: Sat, 07 May 2016 10:25:05 -0000

#12756: [Patch] kits/print/PicturePrinter.cpp: fix gcc6 build
------------------------+------------------------------
 Reporter:  mt          |        Owner:  phoudoin
     Type:  bug         |       Status:  new
 Priority:  normal      |    Milestone:  Unscheduled
Component:  Printing    |      Version:  R1/Development
 Keywords:  kits/print  |   Blocked By:
 Blocking:              |  Has a Patch:  0
 Platform:  All         |
------------------------+------------------------------
 Add curly braces to fix '-Werror=misleading-indentation' warnings.

 {{{
 C++ /home/haiku/haiku/haiku/generated-
 gcc6/objects/haiku/x86/release/kits/print/PicturePrinter.o
 /home/haiku/haiku/haiku/src/kits/print/PicturePrinter.cpp: In member
 function 'virtual void PicturePrinter::SetClippingRects(BRect*, uint32)':
 /home/haiku/haiku/haiku/src/kits/print/PicturePrinter.cpp:205:2: error:
 this 'if' clause does not guard... [-Werror=misleading-indentation]
   if (numRects == 0) Print("none"); Cr();
   ^~
 /home/haiku/haiku/haiku/src/kits/print/PicturePrinter.cpp:205:36: note:
 ...this statement, but the latter is misleadingly indented as if it is
 guarded by the 'if'
   if (numRects == 0) Print("none"); Cr();
                                     ^~
 cc1plus: all warnings being treated as errors
 }}}

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

Other related posts: