Opened 9 years ago
Closed 9 years ago
#12756 closed bug (fixed)
[Patch] kits/print/PicturePrinter.cpp: fix gcc6 build
Reported by: | mt | Owned by: | phoudoin |
---|---|---|---|
Priority: | normal | Milestone: | Unscheduled |
Component: | Printing | Version: | R1/Development |
Keywords: | kits/print | Cc: | |
Blocked By: | Blocking: | ||
Platform: | All |
Description
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
Attachments (2)
Change History (8)
by , 9 years ago
Attachment: | 0010-PicturePrinter.cpp-fix-gcc6-build.patch added |
---|
comment:1 by , 9 years ago
patch: | 0 → 1 |
---|
follow-up: 3 comment:2 by , 9 years ago
comment:3 by , 9 years ago
Replying to korli:
This doesn't fit our coding style, and it looks wrong anyway. "Print("none");" and "Cr();" are meant to be in the same block, aren't?
Hi, korli. I think PicturePrinter::SetClippingRects() generates "SetClippingRects " + Cr or "SetClippingRects none " + Cr, so I think Cr() is not in if block.
comment:5 by , 9 years ago
by , 9 years ago
Attachment: | 0009-PicturePrinter.cpp-fix-gcc6-build.patch added |
---|
Note:
See TracTickets
for help on using tickets.
This doesn't fit our coding style, and it looks wrong anyway. "Print("none");" and "Cr();" are meant to be in the same block, aren't?